Module: Mutineer::MinitestIntegration::InTestDatabaseError::StampQueueIndex

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

Overview

Prepended on Minitest::Test. The worker that runs a test is the worker that records it, but the result does not carry the class object. This notes the test's place in the outer queue and attaches that place to the result. Two anonymous classes that inherit one method stay distinct, because the place is stored on the class object (review of #453).

Instance Method Summary collapse

Instance Method Details

#run ⇒ Minitest::Result

Notes this test's place, runs it, and attaches the place to the result. A nested #run keeps its own place.

Returns:

  • (Minitest::Result)


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

def run
  InTestDatabaseError.stamp(self)
  result = super
  InTestDatabaseError.attach(result)
  result
end