Sha256: e3777c3a91aa5da1cce20937b1b490a22f5174180a9bff9cc124d0c19ed6552a

Contents?: true

Size: 898 Bytes

Versions: 14

Compression:

Stored size: 898 Bytes

Contents

# frozen_string_literal: true

require_relative "runner"
require_relative "reporter"
require_relative "test"
require_relative "runnable"

module Datadog
  module CI
    module Contrib
      module Minitest
        # Patcher enables patching of 'minitest' module.
        module Patcher
          include Datadog::Tracing::Contrib::Patcher

          module_function

          def target_version
            Integration.version
          end

          def patch
            # test session start
            ::Minitest.include(Runner)
            # test suites (when not executed concurrently)
            ::Minitest::Runnable.include(Runnable)
            # tests; test suites (when executed concurrently)
            ::Minitest::Test.include(Test)
            # test session finish
            ::Minitest::CompositeReporter.include(Reporter)
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
datadog-ci-1.8.1 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.8.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.7.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.6.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.5.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.4.1 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.4.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.3.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.2.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.1.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.0.1 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.0.0 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.0.0.beta6 lib/datadog/ci/contrib/minitest/patcher.rb
datadog-ci-1.0.0.beta3 lib/datadog/ci/contrib/minitest/patcher.rb