Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Don't attempt to run typhoeus specs on non-MRI interpreters.

I'm having FFI problems on JRuby and Rubinius.
  • Loading branch information...
commit edf1edfea963d384aa83b655e12f2204437b3ab7 1 parent 8043c32
Myron Marston authored
5 spec/monkey_patches.rb
... ... @@ -1,4 +1,4 @@
1   -require 'typhoeus' unless RUBY_INTERPRETER == :jruby
  1 +require 'typhoeus' if RUBY_INTERPRETER == :mri
2 2
3 3 module MonkeyPatches
4 4 extend self
@@ -66,7 +66,7 @@ def disable_all!
66 66 if defined?(::Typhoeus.before)
67 67 ::Typhoeus.on_complete.clear
68 68 ::Typhoeus.before.clear
69   - else
  69 + elsif defined?(::Typhoeus::Hydra)
70 70 ::Typhoeus::Hydra.clear_global_hooks
71 71 ::Typhoeus::Hydra.stub_finders.clear
72 72 end
@@ -141,7 +141,6 @@ def realias_net_http(alias_extension)
141 141 require 'patron'
142 142 require 'em-http-request'
143 143 require 'curb'
144   - require 'typhoeus'
145 144 end
146 145
147 146 if defined?(::Typhoeus.before)
2  spec/vcr/library_hooks/typhoeus_0.4_spec.rb
@@ -27,5 +27,5 @@ def directly_stub_request(method, url, response_body)
27 27 $typhoeus_after_loaded_hook.conditionally_invoke
28 28 end
29 29 end
30   -end if defined?(::Typhoeus::VERSION) && Float(::Typhoeus::VERSION[/^\d+\.\d+/]) < 0.5
  30 +end if RUBY_INTERPRETER == :mri && ::Typhoeus::VERSION.to_f < 0.5
31 31

0 comments on commit edf1edf

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