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:
Jack Nagel 2014-11-10 19:25:05 -06:00
parent bf53f3fd16
commit 001c9baa7f

View File

@ -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