refactoring rspec examples