Module: Datadog::CI::Contrib::Minitest::Patcher

Includes:
Patcher
Defined in:
lib/datadog/ci/contrib/minitest/patcher.rb

Overview

Patcher enables patching of ‘minitest’ module.

Class Method Summary collapse

Methods included from Patcher

included

Class Method Details

.patchObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/datadog/ci/contrib/minitest/patcher.rb', line 21

def patch
  # test session start
  ::Minitest.include(Runner)

  # test suites (when not executed concurrently)
  if ::Minitest::Runnable.respond_to?(:run_suite)
    ::Minitest::Runnable.include(RunnableMinitest6)
    ::Minitest::Parallel::Executor.include(ParallelExecutorMinitest6)
  else
    ::Minitest::Runnable.include(Runnable)
  end

  # tests; test suites (when executed concurrently)
  ::Minitest::Test.include(Test)
  # test session finish
  ::Minitest::CompositeReporter.include(Reporter)
end