Class: WebMock::Matchers::HashExcludingMatcher
- Inherits:
-
HashArgumentMatcher
- Object
- HashArgumentMatcher
- WebMock::Matchers::HashExcludingMatcher
- Defined in:
- lib/webmock/matchers/hash_excluding_matcher.rb
Overview
this is a based on RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher 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
6 7 8 |
# File 'lib/webmock/matchers/hash_excluding_matcher.rb', line 6 def ==(actual) super { |key, value| !actual.key?(key) || value != actual[key] } end |
#inspect ⇒ Object
10 11 12 |
# File 'lib/webmock/matchers/hash_excluding_matcher.rb', line 10 def inspect "hash_excluding(#{@expected.inspect})" end |