straight line refactoring and rspec