Fix test runner test when the parallelization output is show

Those tests are broken since ecc5afed30.
I'm not sure why they are not broken on CI though.
This commit is contained in:
Rafael Mendonça França 2021-10-12 23:11:49 +00:00 committed by GitHub
parent 0bba05100d
commit f2be2b013c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -745,7 +745,7 @@ module ApplicationTests
file = create_test_for_env("test")
results = Dir.chdir(app_path) {
`ruby -Ilib:test #{file}`.each_line.map { |line| JSON.parse line }
`ruby -Ilib:test #{file}`.each_line.filter_map { |line| JSON.parse(line) if line.start_with?("{") }
}
assert_equal 1, results.length
failures = results.first["failures"]
@ -762,7 +762,8 @@ module ApplicationTests
file = create_test_for_env("development")
results = Dir.chdir(app_path) {
`RAILS_ENV=development ruby -Ilib:test #{file}`.each_line.map { |line| JSON.parse line }
`RAILS_ENV=development ruby -Ilib:test #{file}`.each_line.
filter_map { |line| JSON.parse(line) if line.start_with?("{") }
}
assert_equal 1, results.length
failures = results.first["failures"]