Sha256: 2e202861f608b0ed01fcb49c98b721affa771a8f28b7b41b757e58ad55bbd2d1
Contents?: true
Size: 1000 Bytes
Versions: 17
Compression:
Stored size: 1000 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper')) class NewRelic::DelayedJobInstrumentationTest < Test::Unit::TestCase def test_skip_logging_if_no_logger_found Object.const_set('Delayed', Module.new) unless defined?(Delayed) ::Delayed.const_set('Worker', Class.new) unless defined?(::Delayed::Worker) # on JRuby we need to make sure the worker isn't running, it might # try to log worker = NewRelic::Agent.agent.instance_variable_get(:@worker_loop) worker.stop if worker NewRelic::Agent.stubs(:logger).raises(NoMethodError, 'temporarily not allowed') NewRelic::Agent.stubs(:respond_to?).with(:logger).returns(false) assert DependencyDetection.detect! Object.class_eval { remove_const('Delayed') } end end
Version data entries
17 entries across 17 versions & 1 rubygems