diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-02-21 08:25:15 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2017-02-21 08:28:28 +0100 |
commit | c1b64429b1af45a4a526b3b5bb5a306a0d51e28a (patch) | |
tree | d4068d7234db89cf2b87795bc3ad06a18594704f /railties/test/application | |
parent | de4c9186d8bd03b1957dec6b7c84bfbeef9c31aa (diff) | |
download | rails-c1b64429b1af45a4a526b3b5bb5a306a0d51e28a.tar.gz rails-c1b64429b1af45a4a526b3b5bb5a306a0d51e28a.tar.bz2 rails-c1b64429b1af45a4a526b3b5bb5a306a0d51e28a.zip |
Fix run_via[]= backwards compatibility.
```
Minitest.run_via[:rails] = true
```
👆 would break because a simple alias won't catch the second
true argument there.
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/test_runner_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb index d3d5b6d6dd..ee03d8b86c 100644 --- a/railties/test/application/test_runner_test.rb +++ b/railties/test/application/test_runner_test.rb @@ -15,6 +15,16 @@ module ApplicationTests teardown_app end + def test_run_via_backwardscompatibility + require "rails/test_unit/minitest_plugin" + + assert_nothing_raised do + Minitest.run_via[:ruby] = true + end + + assert_predicate Minitest.run_via, :ruby? + end + def test_run_single_file create_test_file :models, "foo" create_test_file :models, "bar" |