class Mocha::ParameterMatchers::HasValue
Parameter matcher which matches when actual parameter contains Hash
entry with expected value.
def initialize(value)
- Private: -
def initialize(value) @value = value end
def matches?(available_parameters)
- 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
- Private: -
def mocha_inspect "has_value(#{@value.mocha_inspect})" end