Module: Mutineer::MinitestIntegration::StopAtFirstFailure::SkipAfterStop6

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

Overview

Prepended on the singleton class of each test class for Minitest 6.

Instance Method Summary collapse

Instance Method Details

#run(klass, method_name, reporter) ⇒ Object?

Skips one test after a stop, without a record.

Parameters:

  • klass (Class) —

    the test class.

  • method_name (String) —

    the test method.

  • reporter (Minitest::CompositeReporter) —

    the reporter.

Returns:

  • (Object, nil) —

    whatever Minitest returns, or nil when skipped.



79
80
81
82
83
# File 'lib/mutineer/minitest_integration/stop_at_first_failure.rb', line 79

def run(klass, method_name, reporter)
  return if StopAtFirstFailure.stopped_here?

  super
end

#run_suite(reporter, options = {}) ⇒ Object?

Skips the test class after a stop.

Parameters:

  • reporter (Minitest::CompositeReporter) —

    the reporter.

  • options (Hash) (defaults to: {}) —

    the Minitest options.

Returns:

  • (Object, nil) —

    whatever Minitest returns, or nil when skipped.



67
68
69
70
71
# File 'lib/mutineer/minitest_integration/stop_at_first_failure.rb', line 67

def run_suite(reporter, options = {})
  return if StopAtFirstFailure.stopped_here?

  super
end