refactoring rspec