convert test code from rspec to test/unit.