Skip to content

Commit 132b778

Browse files
oriencupakromer
authored andcommitted
Check need_auto_run= method is defined also
1 parent 39556da commit 132b778

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rspec/rails/adapters.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module Rails
3737
# date). If so, we turn the auto runner off.
3838
require 'test/unit'
3939
require 'test/unit/assertions'
40-
Test::Unit::AutoRunner.need_auto_run = false if defined?(Test::Unit::AutoRunner)
40+
Test::Unit::AutoRunner.need_auto_run = false if defined?(Test::Unit::AutoRunner.need_auto_run = ())
4141
rescue LoadError => e
4242
raise LoadError, <<-ERR.squish, e.backtrace
4343
Ruby 2.2+ has removed test/unit from the core library. Rails
@@ -62,7 +62,7 @@ module Rails
6262
require 'test/unit/assertions'
6363
end
6464
# Turn off test unit's auto runner for those using the gem
65-
Test::Unit::AutoRunner.need_auto_run = false if defined?(Test::Unit::AutoRunner)
65+
Test::Unit::AutoRunner.need_auto_run = false if defined?(Test::Unit::AutoRunner.need_auto_run = ())
6666
# Constant aliased to either Minitest or TestUnit, depending on what is
6767
# loaded.
6868
Assertions = Test::Unit::Assertions

0 commit comments

Comments
 (0)