Skip to content
Browse files

assume the passed headers to the ActiveResource HttpMock Request/Resp…

…onse are hashes [Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent ef4fb3d commit 163a7123e5d68ebde0cb80685a9584662cdf4ad3 @technoweenie technoweenie committed Oct 2, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 activeresource/test/http_mock.rb
View
4 activeresource/test/http_mock.rb
@@ -69,7 +69,7 @@ def initialize(site)
class Request
attr_accessor :path, :method, :body, :headers
- def initialize(method, path, body = nil, headers = nil)
+ def initialize(method, path, body = nil, headers = {})
@method, @path, @body, @headers = method, path, body, headers
@headers.update('Content-Type' => 'application/xml')
end
@@ -94,7 +94,7 @@ def hash
class Response
attr_accessor :body, :code, :headers
- def initialize(body, code = 200, headers = nil)
+ def initialize(body, code = 200, headers = {})
@body, @code, @headers = body, code, headers
end

0 comments on commit 163a712

Please sign in to comment.
Something went wrong with that request. Please try again.