Refactor rspec