Method: NewRelic::Agent::Configuration::Manager#add_config_for_testing

Defined in:
lib/new_relic/agent/configuration/manager.rb

#add_config_for_testing(source, level = 0) ⇒ Object

[View source]

40
41
42
43
44
45
46
47
# File 'lib/new_relic/agent/configuration/manager.rb', line 40

def add_config_for_testing(source, level = 0)
  raise 'Invalid config type for testing' unless [Hash, DottedHash].include?(source.class)

  invoke_callbacks(:add, source)
  @configs_for_testing << [source.freeze, level]
  reset_cache
  log_config(:add, source)
end