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 59
def initialize(hash)
  @hash = hash
end

Public Instance Methods

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