Permalink
Browse files

fixed problem with error in suites

  • Loading branch information...
1 parent fea2340 commit 8233b05a3b67ec430df6aca4cb42e39b56b5a460 @realmyst committed Jan 27, 2012
Showing with 6 additions and 4 deletions.
  1. +5 −3 lib/ci/reporter/minitest.rb
  2. +1 −1 lib/ci/reporter/test_suite.rb
@@ -14,7 +14,9 @@ def self.new(fault, type = nil, meth = nil)
return MiniTestFailure.new(fault, meth) if type == :failure
MiniTestError.new(fault)
end
+ end
+ class FailureCore
def location(e)
last_before_assertion = ""
e.backtrace.reverse_each do |s|
@@ -25,7 +27,7 @@ def location(e)
end
end
- class MiniTestSkipped < Failure
+ class MiniTestSkipped < FailureCore
def initialize(fault) @fault = fault end
def failure?() false end
def error?() false end
@@ -34,7 +36,7 @@ def message() @fault.message end
def location() super @fault end
end
- class MiniTestFailure < Failure
+ class MiniTestFailure < FailureCore
def initialize(fault, meth) @fault = fault; @meth = meth end
def failure?() true end
def error?() false end
@@ -43,7 +45,7 @@ def message() @fault.message end
def location() super @fault end
end
- class MiniTestError
+ class MiniTestError < FailureCore
def initialize(fault) @fault = fault end
def failure?() false end
def error?() true end
@@ -140,7 +140,7 @@ def to_xml(builder)
failures.each do |failure|
tag = case failure.class.name
when /TestUnitSkipped/ then :skipped
- when /TestUnitError/ then :error
+ when /TestUnitError/, /MiniTestError/ then :error
else :failure end
builder.tag!(tag, :type => builder.trunc!(failure.name), :message => builder.trunc!(failure.message)) do

0 comments on commit 8233b05

Please sign in to comment.