refactoring rspec test