Module: Mutineer::MinitestIntegration::StopAtFirstFailure::SkipAfterStop5

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#run(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.



93
94
95
96
97
# File 'lib/mutineer/minitest_integration/stop_at_first_failure.rb', line 93

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

  super
end

#run_one_method(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.



105
106
107
108
109
# File 'lib/mutineer/minitest_integration/stop_at_first_failure.rb', line 105

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

  super
end