File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
railties/test/application Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -745,7 +745,7 @@ def test_running_with_ruby_gets_test_env_by_default
745
745
746
746
file = create_test_for_env ( "test" )
747
747
results = Dir . chdir ( app_path ) {
748
- `ruby -Ilib:test #{ file } ` . each_line . map { |line | JSON . parse line }
748
+ `ruby -Ilib:test #{ file } ` . each_line . filter_map { |line | JSON . parse ( line ) if line . start_with? ( "{" ) }
749
749
}
750
750
assert_equal 1 , results . length
751
751
failures = results . first [ "failures" ]
@@ -762,7 +762,8 @@ def test_running_with_ruby_can_set_env_via_cmdline
762
762
763
763
file = create_test_for_env ( "development" )
764
764
results = Dir . chdir ( app_path ) {
765
- `RAILS_ENV=development ruby -Ilib:test #{ file } ` . each_line . map { |line | JSON . parse line }
765
+ `RAILS_ENV=development ruby -Ilib:test #{ file } ` . each_line .
766
+ filter_map { |line | JSON . parse ( line ) if line . start_with? ( "{" ) }
766
767
}
767
768
assert_equal 1 , results . length
768
769
failures = results . first [ "failures" ]
You can’t perform that action at this time.
0 commit comments