aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-06-08 14:51:47 +0200
committerYves Senn <yves.senn@gmail.com>2015-06-11 10:50:10 +0200
commiteec932704f3336294a08957b03e4ec1b18198bf1 (patch)
treeec285fdf04fd553eebb6d1635e243ebcc43cc265 /activesupport
parent96bb004fc6e67cdf1b873f11ad5f8efd06949797 (diff)
downloadrails-eec932704f3336294a08957b03e4ec1b18198bf1.tar.gz
rails-eec932704f3336294a08957b03e4ec1b18198bf1.tar.bz2
rails-eec932704f3336294a08957b03e4ec1b18198bf1.zip
inline test runner check into `as/testing/autorun.rb`.
This makes it possible to easily get the runner working with existing setups that rely on `active_support/testing/autorun.rb`.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/testing/autorun.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/autorun.rb b/activesupport/lib/active_support/testing/autorun.rb
index 5aa5f46310..84c6b89340 100644
--- a/activesupport/lib/active_support/testing/autorun.rb
+++ b/activesupport/lib/active_support/testing/autorun.rb
@@ -2,4 +2,11 @@ gem 'minitest'
require 'minitest'
-Minitest.autorun
+if Minitest.respond_to?(:run_with_rails_extension)
+ unless Minitest.run_with_rails_extension
+ Minitest.run_with_autorun = true
+ Minitest.autorun
+ end
+else
+ Minitest.autorun
+end