Class: Datadog::CI::Contrib::Minitest::Integration

Inherits:
Integration
  • Object
show all
Defined in:
lib/datadog/ci/contrib/minitest/integration.rb

Overview

Description of Minitest integration

Constant Summary collapse

MINIMUM_VERSION =
Gem::Version.new("5.0.0")

Instance Method Summary collapse

Methods inherited from Integration

#available?, #configuration, #configure, #dependants, #enabled, inherited, #late_instrument?, #patchable?, #patched?

Instance Method Details

#compatible?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/datadog/ci/contrib/minitest/integration.rb', line 24

def compatible?
  super && version >= MINIMUM_VERSION
end

#loaded?Boolean

Returns:

  • (Boolean)


19
20
21
22
# File 'lib/datadog/ci/contrib/minitest/integration.rb', line 19

def loaded?
  !defined?(::Minitest).nil? && !defined?(::Minitest::Runnable).nil? && !defined?(::Minitest::Test).nil? &&
    !defined?(::Minitest::CompositeReporter).nil?
end

#new_configurationObject



28
29
30
# File 'lib/datadog/ci/contrib/minitest/integration.rb', line 28

def new_configuration
  Configuration::Settings.new
end

#patcherObject



32
33
34
# File 'lib/datadog/ci/contrib/minitest/integration.rb', line 32

def patcher
  Patcher
end

#versionObject



15
16
17
# File 'lib/datadog/ci/contrib/minitest/integration.rb', line 15

def version
  Gem.loaded_specs["minitest"]&.version
end