Class: CI::Reporter::Failure

Inherits:
Object
  • Object
show all
Defined in:
lib/ci/reporter/test_unit.rb,
lib/ci/reporter/minitest.rb

Overview

Factory for constructing either a CI::Reporter::TestUnitFailure or CI::Reporter::TestUnitError depending on the result of the test.

Class Method Summary collapse

Class Method Details

.new(fault) ⇒ Object



12
13
14
15
16
# File 'lib/ci/reporter/minitest.rb', line 12

def self.new(fault, type = nil, meth = nil)
  return MiniTestSkipped.new(fault) if type == :skip
  return MiniTestFailure.new(fault, meth) if type == :failure
  MiniTestError.new(fault)
end