diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-09-27 16:44:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-27 16:44:27 +0200 |
commit | 21ecf42730de2004a95d913038c1f417c24496be (patch) | |
tree | 1ac5b60c38c3a0db062e8f891dae8a2082a3fc10 /railties/test | |
parent | ebcd9650153ae693939550a6e08898345b986023 (diff) | |
parent | 1269795ae2a6126f8a7b3e1e454c2211dba079d2 (diff) | |
download | rails-21ecf42730de2004a95d913038c1f417c24496be.tar.gz rails-21ecf42730de2004a95d913038c1f417c24496be.tar.bz2 rails-21ecf42730de2004a95d913038c1f417c24496be.zip |
Merge pull request #26637 from y-yagi/prevent_plugin_test_run_twice
use `active_support/testing/autorun` in `bin/test` script
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/plugin_test_runner_test.rb | 6 |
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" |