static public Method

HttpMock.respond_to(pairs = {}) { |Responder.new(responses)| ... }

There's no documentation for this item.

Source Code

# File active_resource/http_mock.rb, line 31
def respond_to(pairs = {})
  reset!
  pairs.each do |(path, response)|
    responses[path] = response
  end

  if block_given?
    yield Responder.new(responses)
  else
    Responder.new(responses)
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.