提交 163a7123 编写于 作者: R Rick Olson

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
上级 ef4fb3de
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册