Rspec refactoring