Sha256: fa5d1d16df8891f7dcfe49e4c15a7445f7abf54e495b5b1ca19dce2a2439b532

Contents?: true

Size: 620 Bytes

Versions: 3

Compression:

Stored size: 620 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper'))
module NewRelic
  class DelayedJobInstrumentationTest < Test::Unit::TestCase
    def test_skip_logging_if_no_logger_found
      Object.const_set('Delayed', Module.new)
      ::Delayed.const_set('Worker', Class.new)
      
      NewRelic::Agent.stubs(:logger).raises(NoMethodError,
                                            'tempoarily not allowed')
      NewRelic::Agent.stubs(:respond_to?).with(:logger).returns(false)
      
      assert DependencyDetection.detect!

      Object.class_eval { remove_const('Delayed') }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newrelic_rpm-3.1.1.beta3 test/new_relic/delayed_job_injection_test.rb
newrelic_rpm-3.1.1.beta2 test/new_relic/delayed_job_injection_test.rb
newrelic_rpm-3.1.1.beta1 test/new_relic/delayed_job_injection_test.rb