rspec refactor