Permalink
Browse files

Match on class name so we don't pollute env with test/unit

Fixes #47.
  • Loading branch information...
1 parent 00a62bf commit a144fccdc5a35472a32f042904080bb2b128b9fb @nicksieger nicksieger committed Dec 14, 2011
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/ci/reporter/test_suite.rb
View
10 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
# software license details.
require 'delegate'
require 'stringio'
-require 'ci/reporter/test_unit'
-
module CI
module Reporter
# Emulates/delegates IO to $stdout or $stderr in order to capture output to report in the XML file.
@@ -140,9 +138,9 @@ def to_xml(builder)
builder.skipped
else
failures.each do |failure|
- tag = case failure
- when TestUnitSkipped then :skipped
- when TestUnitError then :error
+ tag = case failure.class.name
+ when /TestUnitSkipped/ then :skipped
+ when /TestUnitError/ then :error
else :failure end
builder.tag!(tag, :type => builder.trunc!(failure.name), :message => builder.trunc!(failure.message)) do

0 comments on commit a144fcc

Please sign in to comment.