class Mocha::ParameterMatchers::RespondsWith

Parameter matcher which matches if actual parameter returns expected result when specified method is invoked.

def initialize(message, result)

Other tags:
    Private: -
def initialize(message, result)
  @message = message
  @result = result
end

def matches?(available_parameters)

Other tags:
    Private: -
def matches?(available_parameters)
  parameter = available_parameters.shift
  @result.to_matcher.matches?([parameter.__send__(@message)])
end

def mocha_inspect

Other tags:
    Private: -
def mocha_inspect
  "responds_with(#{@message.mocha_inspect}, #{@result.mocha_inspect})"
end