Sha256: f0a3262122b1ef01eabe0af00d2683f383c7f8b0f979dcb13cef7cae7ad1273c

Contents?: true

Size: 607 Bytes

Versions: 8

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

module Datadog
  module CI
    module Contrib
      module Cucumber
        # instruments Cucumber::Core::Test::Step from cucumber-ruby-core to change
        module Step
          def self.included(base)
            base.prepend(InstanceMethods)
          end

          module InstanceMethods
            def execute(*args)
              test_span = CI.active_test
              if test_span&.skipped_by_itr?
                @action.skip(*args)
              else
                super
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
datadog-ci-1.3.0 lib/datadog/ci/contrib/cucumber/step.rb
datadog-ci-1.2.0 lib/datadog/ci/contrib/cucumber/step.rb
datadog-ci-1.1.0 lib/datadog/ci/contrib/cucumber/step.rb
datadog-ci-1.0.1 lib/datadog/ci/contrib/cucumber/step.rb
datadog-ci-1.0.0 lib/datadog/ci/contrib/cucumber/step.rb
datadog-ci-1.0.0.beta6 lib/datadog/ci/contrib/cucumber/step.rb
datadog-ci-1.0.0.beta3 lib/datadog/ci/contrib/cucumber/step.rb
datadog-ci-1.0.0.beta2 lib/datadog/ci/contrib/cucumber/step.rb