# File lib/webmock/matchers/hash_including_matcher.rb, line 20defself.from_rspec_matcher(matcher)
new(matcher.instance_variable_get(:@expected))
end
new(expected)click to toggle source
# File lib/webmock/matchers/hash_including_matcher.rb, line 6definitialize(expected)
@expected = Hash[WebMock::Util::HashKeysStringifier.stringify_keys!(expected).sort]
end
Public Instance Methods
==(actual)click to toggle source
# File lib/webmock/matchers/hash_including_matcher.rb, line 10def==(actual)
@expected.all? {|k,v|actual.has_key?(k) &&v==actual[k]}
rescueNoMethodErrorfalseend
inspect()click to toggle source
# File lib/webmock/matchers/hash_including_matcher.rb, line 16definspect"hash_including(#{@expected.inspect})"end