class Mocha::ParameterMatchers::HasValue

Parameter matcher which matches when actual parameter contains Hash entry with expected value.

def initialize(value)

Other tags:
    Private: -
def initialize(value)
  @value = value
end

def matches?(available_parameters)

Other tags:
    Private: -
def matches?(available_parameters)
  parameter = available_parameters.shift
  return false unless parameter.respond_to?(:values)
  parameter.values.any? { |value| @value.to_matcher.matches?([value]) }
end

def mocha_inspect

Other tags:
    Private: -
def mocha_inspect
  "has_value(#{@value.mocha_inspect})"
end