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.



23
24
25
26
27
28
29
30
# File 'lib/mutineer/minitest_integration/stop_at_first_failure.rb', line 23

def record(result)
  super
  return if result.passed? || result.skipped?
  return unless equal?(StopAtFirstFailure.armed_reporter)
  return unless StopAtFirstFailure.armed_here?

  StopAtFirstFailure.stopped = true
end