Note to future readers: think RSpec does not consider your Hashes equal? One might be an OrderedHash, but from the regular RSpec output you can\'t tell. This was the problem tha
describe 'Hash' do
let(:x) { { :a => 1, :b => 2 } }
let(:y) { { :b => 2, :a => 1 } }
it "should be equal with ==" do
x.should == y
end
end
Passes. I'm not sure what's going on in your specific case. Do you have some failing examples you can share?
Programming Ruby has this to say:
Equality — Two hashes are equal if they have the same default value, they contain the same number of keys, and the value corresponding to each key in the first hash is equal (using ==) to the value for the same key in the second.