Don't record the test if initialization fails
When Test.new raises an ArgumentError, nil will be pushed onto the tests array, and then methods will be called on nil when we iterate over the tests while building the XML output.
This commit is contained in:
parent
bf53f3fd16
commit
001c9baa7f
@ -609,9 +609,9 @@ module Homebrew
|
||||
ofail e.message
|
||||
else
|
||||
test_error = !test.run
|
||||
tests << test
|
||||
end
|
||||
any_errors ||= test_error
|
||||
tests << test
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user