assume the passed headers to the ActiveResource HttpMock Request/Response are hashes [Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Rick Olson 2006-10-02 14:20:18 +00:00
parent ef4fb3dee2
commit 163a7123e5
1 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ module ActiveResource
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 @@ module ActiveResource
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