class RSpec::Mocks::ArgumentMatchers::BaseHashMatcher
@private
def ===(predicate, actual)
def ===(predicate, actual) @expected.__send__(predicate) do |k, v| actual.key?(k) && Support::FuzzyMatcher.values_match?(v, actual[k]) end rescue NoMethodError false end
def description(name)
def description(name) "#{name}(#{formatted_expected_hash.inspect.sub(/^\{/, "").sub(/\}$/, "")})" end
def formatted_expected_hash
def formatted_expected_hash Hash[ @expected.map do |k, v| k = RSpec::Support.rspec_description_for_object(k) v = RSpec::Support.rspec_description_for_object(v) [k, v] end ] end
def initialize(expected)
def initialize(expected) @expected = expected end