class FlexMock::HashMatcher

Match hashes that match all the fields of hash.

Public Class Methods

new(hash) click to toggle source
# File lib/flexmock/argument_matchers.rb, line 58
def initialize(hash)
  @hash = hash
end

Public Instance Methods

===(target) click to toggle source
# File lib/flexmock/argument_matchers.rb, line 61
def ===(target)
  @hash.all? { |k, v| target[k] == v }
end
inspect() click to toggle source
# File lib/flexmock/argument_matchers.rb, line 64
def inspect
  "hsh(#{@hash.inspect})"
end