Class: Datadog::CI::Contrib::RSpec::Integration
- Inherits:
-
Contrib::Integration
- Object
- Contrib::Integration
- Datadog::CI::Contrib::RSpec::Integration
- Defined in:
- lib/datadog/ci/contrib/rspec/integration.rb
Overview
Description of RSpec integration
Constant Summary collapse
- MINIMUM_VERSION =
Gem::Version.new("3.0.0")
Instance Method Summary collapse
- #compatible? ⇒ Boolean
- #dependants ⇒ Object
- #loaded? ⇒ Boolean
- #new_configuration ⇒ Object
- #patcher ⇒ Object
- #test_discovery_component ⇒ Object
- #version ⇒ Object
Instance Method Details
#compatible? ⇒ Boolean
30 31 32 |
# File 'lib/datadog/ci/contrib/rspec/integration.rb', line 30 def compatible? super && version >= MINIMUM_VERSION end |
#dependants ⇒ Object
15 16 17 |
# File 'lib/datadog/ci/contrib/rspec/integration.rb', line 15 def dependants %i[knapsack ciqueue] end |
#loaded? ⇒ Boolean
23 24 25 26 27 28 |
# File 'lib/datadog/ci/contrib/rspec/integration.rb', line 23 def loaded? !defined?(::RSpec).nil? && !defined?(::RSpec::Core).nil? && !defined?(::RSpec::Core::Example).nil? && !defined?(::RSpec::Core::Runner).nil? && !defined?(::RSpec::Core::ExampleGroup).nil? end |
#new_configuration ⇒ Object
34 35 36 |
# File 'lib/datadog/ci/contrib/rspec/integration.rb', line 34 def new_configuration Configuration::Settings.new end |
#patcher ⇒ Object
38 39 40 |
# File 'lib/datadog/ci/contrib/rspec/integration.rb', line 38 def patcher Patcher end |
#test_discovery_component ⇒ Object
42 43 44 45 46 |
# File 'lib/datadog/ci/contrib/rspec/integration.rb', line 42 def test_discovery_component components = Datadog.send(:components) return nil unless components.respond_to?(:test_discovery) components.test_discovery end |
#version ⇒ Object
19 20 21 |
# File 'lib/datadog/ci/contrib/rspec/integration.rb', line 19 def version Gem.loaded_specs["rspec-core"]&.version end |