- update documentation

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Gaston Ramos 2010-10-06 19:27:25 -03:00 committed by José Valim
parent aee043de5a
commit cec6f3fe20

@ -168,6 +168,15 @@ def responses
#
# ActiveResource::HttpMock.respond_to(pairs, false)
# ActiveResource::HttpMock.responses.length #=> 2
#
# # If you add a response with an existing request, it will be replaced
#
# fail_response = ActiveResource::Response.new("", 404, {})
# pairs = {get_matz => fail_response}
#
# ActiveResource::HttpMock.respond_to(pairs, false)
# ActiveResource::HttpMock.responses.length #=> 2
#
def respond_to(*args) #:yields: mock
pairs = args.first || {}
reset! if args.last.class != FalseClass