Refactored rspec file