Skip to content

Commit

Permalink
Match on class name so we don't pollute env with test/unit
Browse files Browse the repository at this point in the history
Fixes #47.
  • Loading branch information
nicksieger committed Dec 14, 2011
1 parent 00a62bf commit a144fcc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/ci/reporter/test_suite.rb
@@ -1,12 +1,10 @@
# Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com> # Copyright (c) 2006-2011 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for # See the file LICENSE.txt included with the distribution for
# software license details. # software license details.


require 'delegate' require 'delegate'
require 'stringio' require 'stringio'


require 'ci/reporter/test_unit'

module CI module CI
module Reporter module Reporter
# Emulates/delegates IO to $stdout or $stderr in order to capture output to report in the XML file. # Emulates/delegates IO to $stdout or $stderr in order to capture output to report in the XML file.
Expand Down Expand Up @@ -140,9 +138,9 @@ def to_xml(builder)
builder.skipped builder.skipped
else else
failures.each do |failure| failures.each do |failure|
tag = case failure tag = case failure.class.name
when TestUnitSkipped then :skipped when /TestUnitSkipped/ then :skipped
when TestUnitError then :error when /TestUnitError/ then :error
else :failure end else :failure end


builder.tag!(tag, :type => builder.trunc!(failure.name), :message => builder.trunc!(failure.message)) do builder.tag!(tag, :type => builder.trunc!(failure.name), :message => builder.trunc!(failure.message)) do
Expand Down

0 comments on commit a144fcc

Please sign in to comment.