Class: WebMock::Matchers::HashIncludingMatcher
- Inherits:
-
HashArgumentMatcher
- Object
- HashArgumentMatcher
- WebMock::Matchers::HashIncludingMatcher
- Defined in:
- lib/webmock/matchers/hash_including_matcher.rb
Overview
this is a based on RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher github.com/rspec/rspec-mocks/blob/master/lib/rspec/mocks/argument_matchers.rb
Instance Method Summary collapse
Methods inherited from HashArgumentMatcher
from_rspec_matcher, #initialize
Constructor Details
This class inherits a constructor from WebMock::Matchers::HashArgumentMatcher
Instance Method Details
#==(actual) ⇒ Object
8 9 10 11 12 |
# File 'lib/webmock/matchers/hash_including_matcher.rb', line 8 def ==(actual) super { |key, value| actual.key?(key) && value === actual[key] } rescue NoMethodError false end |
#inspect ⇒ Object
14 15 16 |
# File 'lib/webmock/matchers/hash_including_matcher.rb', line 14 def inspect "hash_including(#{@expected.inspect})" end |