Created
March 23, 2010 13:24
-
-
Save samhendley/341156 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CI | |
module Reporter | |
# monkey patch that stops it from exploding when used with the new features in | |
# test/unit 2.0.x. | |
class Failure | |
def self.new(fault) | |
return TestUnitFailure.new(fault) if fault.kind_of?(Test::Unit::Failure) | |
if Test::Unit.constants.include? "Omission" | |
return TestUnitSkipped.new(fault) if fault.kind_of?(Test::Unit::Omission) | |
return TestUnitSkipped.new(fault) if fault.kind_of?(Test::Unit::Pending) | |
end | |
TestUnitError.new(fault) | |
end | |
end | |
class TestUnitSkipped | |
def initialize(fault) | |
@fault = fault | |
end | |
def failure?() false end | |
def error?() false end | |
def name() Test::Unit::Omission.name end | |
def message() @fault.message end | |
def location() @fault.location.join("\n") end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment