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:
parent
ef4fb3dee2
commit
163a7123e5
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue