aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
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/test/generators
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/test/generators')
-rw-r--r--railties/test/generators/plugin_test_runner_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_test_runner_test.rb b/railties/test/generators/plugin_test_runner_test.rb
index 04b4b10254..7a10a2afa9 100644
--- a/railties/test/generators/plugin_test_runner_test.rb
+++ b/railties/test/generators/plugin_test_runner_test.rb
@@ -86,6 +86,12 @@ class PluginTestRunnerTest < ActiveSupport::TestCase
assert_match(%r{cannot load such file.+test/not_exists\.rb}, error)
end
+ def test_executed_only_once
+ create_test_file "foo"
+ result = run_test_command("test/foo_test.rb")
+ assert_equal 1, result.scan(/1 runs, 1 assertions, 0 failures/).length
+ end
+
private
def plugin_path
"#{@destination_root}/bukkits"