aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/Rakefile
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2019-03-05 01:40:36 +1030
committerMatthew Draper <matthew@trebex.net>2019-03-05 02:02:41 +1030
commit99d84c6ab288788b85c0c3603d4630b39cf29ed0 (patch)
treeee677f7ae7f2683f4cc4528e3f3180179c961583 /activerecord/Rakefile
parentaf986325e9da4f6c446b9adb62058e82b33cc8d4 (diff)
downloadrails-99d84c6ab288788b85c0c3603d4630b39cf29ed0.tar.gz
rails-99d84c6ab288788b85c0c3603d4630b39cf29ed0.tar.bz2
rails-99d84c6ab288788b85c0c3603d4630b39cf29ed0.zip
Clean up AR's isolated test runner
Diffstat (limited to 'activerecord/Rakefile')
-rw-r--r--activerecord/Rakefile18
1 files changed, 15 insertions, 3 deletions
diff --git a/activerecord/Rakefile b/activerecord/Rakefile
index be2380ebdc..f259ae7e12 100644
--- a/activerecord/Rakefile
+++ b/activerecord/Rakefile
@@ -80,9 +80,19 @@ end
require "bundler/setup" unless defined?(Bundler)
- # Every test file loads this first, so doing it post-fork gains
- # us nothing.
- require "cases/helper"
+ # Every test file loads "cases/helper" first, so doing it
+ # post-fork gains us nothing.
+
+ # We need to dance around minitest autorun, though.
+ require "minitest"
+ Minitest.instance_eval do
+ alias _original_autorun autorun
+ def autorun
+ # no-op
+ end
+ require "cases/helper"
+ alias autorun _original_autorun
+ end
failing_files = []
@@ -115,6 +125,8 @@ end
ARGV.clear.concat test_options
Rake.application = nil
+ Minitest.autorun
+
load file
}