diff options
| author | Jack Nagel | 2014-12-02 21:14:53 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-12-02 21:14:53 -0500 |
| commit | f0e01a057846da71e67af3d475b219872068b074 (patch) | |
| tree | 5d18f3fa62afb4b431a9422a8ae2cb646b18fa90 /Library | |
| parent | b9474dfc4283f3e3f649183b6ad90f2977074fc5 (diff) | |
| download | brew-f0e01a057846da71e67af3d475b219872068b074.tar.bz2 | |
Use add_attribute method instead of accessing attributes hash
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/test-bot.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index 299d15774..fb66bd912 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -679,16 +679,18 @@ module Homebrew if ARGV.include? "--junit" xml_document = REXML::Document.new xml_document << REXML::XMLDecl.new - testsuites = xml_document.add_element 'testsuites' + testsuites = xml_document.add_element "testsuites" + tests.each do |test| - testsuite = testsuites.add_element 'testsuite' - testsuite.attributes['name'] = "brew-test-bot.#{MacOS.cat}" - testsuite.attributes['tests'] = test.steps.count + testsuite = testsuites.add_element "testsuite" + testsuite.add_attribute "name", "brew-test-bot.#{MacOS.cat}" + testsuite.add_attribute "tests", test.steps.count + test.steps.each do |step| - testcase = testsuite.add_element 'testcase' - testcase.attributes['name'] = step.command_short - testcase.attributes['status'] = step.status - testcase.attributes['time'] = step.time + testcase = testsuite.add_element "testcase" + testcase.add_attribute "name", step.command_short + testcase.add_attribute "status", step.status + testcase.add_attribute "time", step.time if step.has_output? # Remove invalid XML CData characters from step output. |
