Permalink
Browse files

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

I'm having FFI problems on JRuby and Rubinius.
  • Loading branch information...
1 parent 8043c32 commit edf1edfea963d384aa83b655e12f2204437b3ab7 @myronmarston committed Oct 30, 2012
Showing with 3 additions and 4 deletions.
  1. +2 −3 spec/monkey_patches.rb
  2. +1 −1 spec/vcr/library_hooks/typhoeus_0.4_spec.rb
View
@@ -1,4 +1,4 @@
-require 'typhoeus' unless RUBY_INTERPRETER == :jruby
+require 'typhoeus' if RUBY_INTERPRETER == :mri
module MonkeyPatches
extend self
@@ -66,7 +66,7 @@ def disable_all!
if defined?(::Typhoeus.before)
::Typhoeus.on_complete.clear
::Typhoeus.before.clear
- else
+ elsif defined?(::Typhoeus::Hydra)
::Typhoeus::Hydra.clear_global_hooks
::Typhoeus::Hydra.stub_finders.clear
end
@@ -141,7 +141,6 @@ def realias_net_http(alias_extension)
require 'patron'
require 'em-http-request'
require 'curb'
- require 'typhoeus'
end
if defined?(::Typhoeus.before)
@@ -27,5 +27,5 @@ def directly_stub_request(method, url, response_body)
$typhoeus_after_loaded_hook.conditionally_invoke
end
end
-end if defined?(::Typhoeus::VERSION) && Float(::Typhoeus::VERSION[/^\d+\.\d+/]) < 0.5
+end if RUBY_INTERPRETER == :mri && ::Typhoeus::VERSION.to_f < 0.5

0 comments on commit edf1edf

Please sign in to comment.