Sha256: a8470b4a095f319aebdb8a02ef67ba2e25b86ea2c9b3ce7592f0b81891dd8e4a

Contents?: true

Size: 656 Bytes

Versions: 22

Compression:

Stored size: 656 Bytes

Contents

# frozen_string_literal: true
# A stub for the NewRelic agent, so we can make assertions about how it is used
if defined?(NewRelic)
  raise "Expected NewRelic to be undefined, so that we could define a stub for it."
end

module NewRelic
  TRANSACTION_NAMES = []
  EXECUTION_SCOPES = []
  # Reset state between tests
  def self.clear_all
    TRANSACTION_NAMES.clear
    EXECUTION_SCOPES.clear
  end
  module Agent
    def self.set_transaction_name(name)
      TRANSACTION_NAMES << name
    end

    module MethodTracerHelpers
      def self.trace_execution_scoped(trace_name)
        EXECUTION_SCOPES << trace_name
        yield
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
graphql-1.8.18 spec/support/new_relic.rb
graphql-1.9.11 spec/support/new_relic.rb
graphql-1.9.10 spec/support/new_relic.rb
graphql-1.9.9 spec/support/new_relic.rb
graphql-1.9.8 spec/support/new_relic.rb
graphql-1.9.7 spec/support/new_relic.rb
graphql-1.9.6 spec/support/new_relic.rb
graphql-1.9.5 spec/support/new_relic.rb
graphql-1.9.4 spec/support/new_relic.rb
graphql-1.9.3 spec/support/new_relic.rb
graphql-1.9.2 spec/support/new_relic.rb
graphql-1.8.17 spec/support/new_relic.rb
graphql-1.8.16 spec/support/new_relic.rb
graphql-1.9.1 spec/support/new_relic.rb
graphql-1.9.0 spec/support/new_relic.rb
graphql-1.8.15 spec/support/new_relic.rb
graphql-1.9.0.pre4 spec/support/new_relic.rb
graphql-1.8.14 spec/support/new_relic.rb
graphql-1.9.0.pre3 spec/support/new_relic.rb
graphql-1.9.0.pre2 spec/support/new_relic.rb