aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-09-27 12:12:12 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-09-27 19:34:58 +0900
commit1269795ae2a6126f8a7b3e1e454c2211dba079d2 (patch)
tree7a53ffd0064549f222216a78136e27a85ccf72af /railties/lib
parentc994a893c18c0456fd2a30efe4debfc2b18e2508 (diff)
downloadrails-1269795ae2a6126f8a7b3e1e454c2211dba079d2.tar.gz
rails-1269795ae2a6126f8a7b3e1e454c2211dba079d2.tar.bz2
rails-1269795ae2a6126f8a7b3e1e454c2211dba079d2.zip
use `active_support/testing/autorun` in `bin/test` script
29f0fbd5db643b885665e4a14c7de3bf6c0d9c96 has changed that always call `Minitest.autorun` in `active_support/testing/autorun`. Therefore, when used directly `Minitest.run`, tests are performed twice.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/bin/test.tt4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/templates/bin/test.tt b/railties/lib/rails/generators/rails/plugin/templates/bin/test.tt
index 62b94618fd..c0fbb84a93 100644
--- a/railties/lib/rails/generators/rails/plugin/templates/bin/test.tt
+++ b/railties/lib/rails/generators/rails/plugin/templates/bin/test.tt
@@ -5,4 +5,6 @@ require 'rails/test_unit/minitest_plugin'
Rails::TestUnitReporter.executable = 'bin/test'
-exit Minitest.run(ARGV)
+Minitest.run_via[:rails] = true
+
+require "active_support/testing/autorun"