Skip to content
Browse files

Don't use with_connection.

  • Loading branch information...
1 parent f118ccc commit aeac5cc6a1ac7a313c138514d66cd536802b9dc4 @i0rek committed Oct 6, 2012
View
1 lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb
@@ -136,6 +136,7 @@ def self.request_hash(request_signature)
unless WebMock::HttpLibAdapters::TyphoeusAdapter.disabled?
request_signature = ::WebMock::HttpLibAdapters::TyphoeusAdapter.build_request_signature(request)
+ request.block_connection = false;
::WebMock::RequestRegistry.instance.requested_signatures.put(request_signature)
View
9 spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
@@ -15,11 +15,10 @@ def http_request(method, uri, options = {}, &block)
:timeout => 25000
}
)
- Typhoeus.with_connection {
- hydra = Typhoeus::Hydra.new
- hydra.queue(request)
- hydra.run
- }
+ hydra = Typhoeus::Hydra.new
+ hydra.queue(request)
+ hydra.run
+
response = request.response
raise FakeTyphoeusHydraConnectError.new if response.return_code == :couldnt_connect
raise FakeTyphoeusHydraTimeoutError.new if response.timed_out?

0 comments on commit aeac5cc

Please sign in to comment.
Something went wrong with that request. Please try again.