refactor rspec