Fixed rspec test logic