converted test to rspec test