diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-04-23 18:22:04 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-04-25 08:33:39 +0900 |
commit | 9fa07095a35be2d8cb5adcc992b988e73a6d9719 (patch) | |
tree | a64f28a3cfb1c9aa1111394501f9f16548cdacab /railties/lib/rails/test_unit | |
parent | 8e7715ae31dba383f1c0497adf1b85c7a99ef5da (diff) | |
download | rails-9fa07095a35be2d8cb5adcc992b988e73a6d9719.tar.gz rails-9fa07095a35be2d8cb5adcc992b988e73a6d9719.tar.bz2 rails-9fa07095a35be2d8cb5adcc992b988e73a6d9719.zip |
remove unnessary option setting from test runner
If run the test over the `rake` command, because of the test patterns is passed
via `rake_run` method, do not need to be obtained from the argv.
This probably fixes #24372.
Diffstat (limited to 'railties/lib/rails/test_unit')
-rw-r--r-- | railties/lib/rails/test_unit/minitest_plugin.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/railties/lib/rails/test_unit/minitest_plugin.rb b/railties/lib/rails/test_unit/minitest_plugin.rb index e9195d5b4e..076ab536be 100644 --- a/railties/lib/rails/test_unit/minitest_plugin.rb +++ b/railties/lib/rails/test_unit/minitest_plugin.rb @@ -54,7 +54,7 @@ module Minitest options[:color] = true options[:output_inline] = true - options[:patterns] = opts.order! + options[:patterns] = defined?(@rake_patterns) ? @rake_patterns : opts.order! end # Running several Rake tasks in a single command would trip up the runner, @@ -73,10 +73,7 @@ module Minitest ENV["RAILS_ENV"] = options[:environment] || "test" - unless run_with_autorun - patterns = defined?(@rake_patterns) ? @rake_patterns : options[:patterns] - ::Rails::TestRequirer.require_files(patterns) - end + ::Rails::TestRequirer.require_files(options[:patterns]) unless run_with_autorun unless options[:full_backtrace] || ENV["BACKTRACE"] # Plugin can run without Rails loaded, check before filtering. |