Skip to content

Commit

Permalink
HttpMock InvalidRequestError inspects the mismatched request
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5768 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Dec 21, 2006
1 parent e6988ef commit 8cb6cb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activeresource/lib/active_resource/http_mock.rb
Expand Up @@ -46,7 +46,7 @@ def reset!
def #{method}(path, body, headers) def #{method}(path, body, headers)
request = ActiveResource::Request.new(:#{method}, path, body, headers) request = ActiveResource::Request.new(:#{method}, path, body, headers)
self.class.requests << request 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 end
EOE EOE
end end
Expand All @@ -56,7 +56,7 @@ def #{method}(path, body, headers)
def #{method}(path, headers) def #{method}(path, headers)
request = ActiveResource::Request.new(:#{method}, path, nil, headers) request = ActiveResource::Request.new(:#{method}, path, nil, headers)
self.class.requests << request 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 end
EOE EOE
end end
Expand Down

0 comments on commit 8cb6cb5

Please sign in to comment.