mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
HttpMock InvalidRequestError inspects the mismatched request
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5768 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
e6988ef2ce
commit
8cb6cb58a2
1 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ module ActiveResource
|
|||
def #{method}(path, body, headers)
|
||||
request = ActiveResource::Request.new(:#{method}, path, body, headers)
|
||||
self.class.requests << request
|
||||
self.class.responses[request] || raise(InvalidRequestError.new("No response recorded for: \#{request}"))
|
||||
self.class.responses[request] || raise(InvalidRequestError.new("No response recorded for: \#{request.inspect}"))
|
||||
end
|
||||
EOE
|
||||
end
|
||||
|
@ -56,7 +56,7 @@ module ActiveResource
|
|||
def #{method}(path, headers)
|
||||
request = ActiveResource::Request.new(:#{method}, path, nil, headers)
|
||||
self.class.requests << request
|
||||
self.class.responses[request] || raise(InvalidRequestError.new("No response recorded for: \#{request}"))
|
||||
self.class.responses[request] || raise(InvalidRequestError.new("No response recorded for: \#{request.inspect}"))
|
||||
end
|
||||
EOE
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue