rspec refactoring