Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use block_connection.

  • Loading branch information...
commit 48daae8f297e8e9692a8a618d2cbf320fba715c5 1 parent 250e1e2
Hans Hasselberg authored August 22, 2012
4  lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb
@@ -15,13 +15,13 @@ class TyphoeusAdapter < HttpLibAdapter
15 15
         def self.enable!
16 16
           @disabled = false
17 17
           add_after_request_callback
18  
-          ::Typhoeus::Hydra.allow_net_connect = true
  18
+          ::Typhoeus::Config.block_connection = true
19 19
         end
20 20
 
21 21
         def self.disable!
22 22
           @disabled = true
23 23
           remove_after_request_callback
24  
-          ::Typhoeus::Hydra.allow_net_connect = true
  24
+          ::Typhoeus::Config.block_connection = false
25 25
         end
26 26
 
27 27
         def self.disabled?

0 notes on commit 48daae8

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