Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Don't use with_connection.

  • Loading branch information...
commit aeac5cc6a1ac7a313c138514d66cd536802b9dc4 1 parent f118ccc
Hans Hasselberg authored October 06, 2012
1  lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb
@@ -136,6 +136,7 @@ def self.request_hash(request_signature)
136 136
 
137 137
           unless WebMock::HttpLibAdapters::TyphoeusAdapter.disabled?
138 138
             request_signature = ::WebMock::HttpLibAdapters::TyphoeusAdapter.build_request_signature(request)
  139
+            request.block_connection = false;
139 140
 
140 141
             ::WebMock::RequestRegistry.instance.requested_signatures.put(request_signature)
141 142
 
9  spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb
@@ -15,11 +15,10 @@ def http_request(method, uri, options = {}, &block)
15 15
         :timeout => 25000
16 16
       }
17 17
     )
18  
-    Typhoeus.with_connection {
19  
-      hydra = Typhoeus::Hydra.new
20  
-      hydra.queue(request)
21  
-      hydra.run
22  
-    }
  18
+    hydra = Typhoeus::Hydra.new
  19
+    hydra.queue(request)
  20
+    hydra.run
  21
+
23 22
     response = request.response
24 23
     raise FakeTyphoeusHydraConnectError.new if response.return_code == :couldnt_connect
25 24
     raise FakeTyphoeusHydraTimeoutError.new if response.timed_out?

0 notes on commit aeac5cc

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