test/logger_test.rb in semantic_logger-3.4.0 vs test/logger_test.rb in semantic_logger-3.4.1
- old
+ new
@@ -33,10 +33,16 @@
assert SemanticLogger.appenders.include?(@appender)
end
it 'adds symbol appender' do
@appender = SemanticLogger.add_appender(appender: :wrapper, logger: Logger.new(STDOUT))
- assert @appender.is_a?(SemanticLogger::Appender::Wrapper), @appender.ai
+ assert @appender.is_a?(SemanticLogger::Appender::Wrapper), -> { @appender.ai }
+ assert SemanticLogger.appenders.include?(@appender)
+ end
+
+ it 'adds symbol appender with underscores' do
+ @appender = SemanticLogger.add_appender(appender: :new_relic)
+ assert @appender.is_a?(SemanticLogger::Appender::NewRelic), -> { @appender.ai }
assert SemanticLogger.appenders.include?(@appender)
end
it 'adds logger wrapper appender' do
@appender = SemanticLogger.add_appender(logger: ::Logger.new(STDOUT))