- update documentation
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
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
|
||||
|
Loading…
Reference in New Issue
Block a user