Module: Mutineer::MinitestIntegration::StopAtFirstFailure::RecordFailure

Defined in:
lib/mutineer/minitest_integration/stop_at_first_failure.rb

Overview

Prepended on Minitest::CompositeReporter.

Instance Method Summary collapse

Instance Method Details

#record(result) ⇒ void

This method returns an undefined value.

Records the result, then sets the stop flag on a failure or an error. Only the outer reporter counts: a test can build and record on its own reporter.

Parameters:

  • result (Minitest::Result) —

    the result of one test.



28
29
30
31
32
33
34
# File 'lib/mutineer/minitest_integration/stop_at_first_failure.rb', line 28

def record(result)
  super
  return if result.passed? || result.skipped?
  return unless StopAtFirstFailure.outer_reporter?(self)

  StopAtFirstFailure.stopped = true
end