Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use response#headers instead header.

  • Loading branch information...
commit f118cccfed50ad122487a5fcb4072ba00b186e38 1 parent 53564ea
Hans Hasselberg authored
6 lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb
View
@@ -75,7 +75,7 @@ def self.build_webmock_response(typhoeus_response)
webmock_response = WebMock::Response.new
webmock_response.status = [typhoeus_response.code, typhoeus_response.status_message]
webmock_response.body = typhoeus_response.body
- webmock_response.headers = typhoeus_response.header
+ webmock_response.headers = typhoeus_response.headers
webmock_response
end
@@ -85,7 +85,7 @@ def self.generate_typhoeus_response(request_signature, webmock_response)
:code => 0,
:status_message => "",
:body => "",
- :header => {},
+ :headers => {},
:return_code => :operation_timedout
)
else
@@ -93,7 +93,7 @@ def self.generate_typhoeus_response(request_signature, webmock_response)
:code => webmock_response.status[0],
:status_message => webmock_response.status[1],
:body => webmock_response.body,
- :header => webmock_response.headers
+ :headers => webmock_response.headers
)
end
response.mock = :webmock
2  spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
View
@@ -25,7 +25,7 @@ def http_request(method, uri, options = {}, &block)
raise FakeTyphoeusHydraTimeoutError.new if response.timed_out?
OpenStruct.new({
:body => response.body,
- :headers => WebMock::Util::Headers.normalize_headers(join_array_values(response.header)),
+ :headers => WebMock::Util::Headers.normalize_headers(join_array_values(response.headers)),
:status => response.code.to_s,
:message => response.status_message
})
Please sign in to comment.
Something went wrong with that request. Please try again.