diff --git a/activeresource/test/http_mock.rb b/activeresource/test/http_mock.rb index 66351501d9..1166a56af7 100644 --- a/activeresource/test/http_mock.rb +++ b/activeresource/test/http_mock.rb @@ -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