Does an RSpec2 matcher for matching Hashes exist?
问题 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 that prompted this post. Original question: Suppose I have a spec where I want to test that a method generates the appropriate Hash. it 'should generate the Hash correctly' do expected = {:foo => 1, 'baz' => 2} subject.some_method_that_should_generate_the_hash.should == expected end This often fails, because different