lib/webmock/matchers/hash_including_matcher.rb in webmock-1.18.0 vs lib/webmock/matchers/hash_including_matcher.rb in webmock-1.19.0
- old
+ new
@@ -2,10 +2,10 @@
module Matchers
#this is a based on RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher
#https://github.com/rspec/rspec-mocks/blob/master/lib/rspec/mocks/argument_matchers.rb
class HashIncludingMatcher
def initialize(expected)
- @expected = Hash[WebMock::Util::HashKeysStringifier.stringify_keys!(expected).sort]
+ @expected = Hash[WebMock::Util::HashKeysStringifier.stringify_keys!(expected, :deep => true).sort]
end
def ==(actual)
@expected.all? {|k,v| actual.has_key?(k) && v == actual[k]}
rescue NoMethodError