aboutsummaryrefslogtreecommitdiffstats
path: root/railties/Rakefile
diff options
context:
space:
mode:
authorutilum <oz@utilum.com>2018-06-30 23:43:58 +0200
committerutilum <oz@utilum.com>2018-07-01 11:36:17 +0200
commit243c856ce9c9329edbd482e18600a602654a75ec (patch)
tree14d8312b623c283b8037bff91aaf3fb3a3be863a /railties/Rakefile
parentb3653aee947a5f8c3a298913e539493d17c1932b (diff)
downloadrails-243c856ce9c9329edbd482e18600a602654a75ec.tar.gz
rails-243c856ce9c9329edbd482e18600a602654a75ec.tar.bz2
rails-243c856ce9c9329edbd482e18600a602654a75ec.zip
Fix assignment of TESTOPTS in railties test task
The assignment of `ENV["TESTOPTS"]` to `ARGV`, introduced in 09f9a7a5b, did not take into account passing multiple options, such as `--verbose --seed=1`. This patch fixes it.
Diffstat (limited to 'railties/Rakefile')
-rw-r--r--railties/Rakefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/Rakefile b/railties/Rakefile
index f918329df3..e1be0ceb40 100644
--- a/railties/Rakefile
+++ b/railties/Rakefile
@@ -31,6 +31,8 @@ namespace :test do
failing_files = []
dirs = (ENV["TEST_DIR"] || ENV["TEST_DIRS"] || "**").split(",")
+ test_options = ENV["TESTOPTS"].to_s.split(/[\s]+/)
+
test_files = dirs.map { |dir| "test/#{dir}/*_test.rb" }
Dir[*test_files].each do |file|
next true if file.start_with?("test/fixtures/")
@@ -46,7 +48,7 @@ namespace :test do
# We could run these in parallel, but pretty much all of the
# railties tests already run in parallel, so ¯\_(⊙︿⊙)_/¯
Process.waitpid fork {
- ARGV.clear.push ENV["TESTOPTS"]
+ ARGV.clear.concat test_options
Rake.application = nil
load file