Class: GrpcMock::Matchers::RequestIncludingMatcher

Inherits:
HashArgumentMatcher show all
Defined in:
lib/grpc_mock/matchers/request_including_matcher.rb

Instance Method Summary collapse

Methods inherited from HashArgumentMatcher

from_rspec_matcher, #initialize, stringify_keys!

Constructor Details

This class inherits a constructor from GrpcMock::Matchers::HashArgumentMatcher

Instance Method Details

#==(actual) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/grpc_mock/matchers/request_including_matcher.rb', line 8

def ==(actual)
  if actual.respond_to?(:to_h)
    actual = actual.to_h
  end

  actual = Hash[GrpcMock::Matchers::HashArgumentMatcher.stringify_keys!(actual, deep: true)]
  super { |key, value| inner_including(value, key, actual) }
rescue NoMethodError
  false
end