class FlexMock::HashMatcher
Match hashes that match all the fields of hash
.
Public Class Methods
Source
# File lib/flexmock/argument_matchers.rb, line 59 def initialize(hash) @hash = hash end
Public Instance Methods
Source
# File lib/flexmock/argument_matchers.rb, line 62 def ===(target) @hash.all? { |k, v| target[k] == v } end
Source
# File lib/flexmock/argument_matchers.rb, line 68 def inspect "hsh(#{@hash.inspect})" end