diff --git a/lib/hydra/runner.rb b/lib/hydra/runner.rb index 432a97c..417f510 100644 --- a/lib/hydra/runner.rb +++ b/lib/hydra/runner.rb @@ -110,7 +110,7 @@ module Hydra #:nodoc: require 'rspec' require 'hydra/spec/hydra_formatter' # Ensure we override rspec's at_exit - require 'hydra/spec/autorun_override' + RSpec::Core::Runner.disable_autorun! rescue LoadError => ex return ex.to_s end diff --git a/lib/hydra/tasks.rb b/lib/hydra/tasks.rb index 39fd270..b41c932 100644 --- a/lib/hydra/tasks.rb +++ b/lib/hydra/tasks.rb @@ -79,7 +79,9 @@ module Hydra #:nodoc: yield self if block_given? # Ensure we override rspec's at_exit - require 'hydra/spec/autorun_override' + if defined?(RSpec) + RSpec::Core::Runner.disable_autorun! + end unless @serial @config = find_config_file