test/concerns/compatibility_test.rb in semantic_logger-3.3.0 vs test/concerns/compatibility_test.rb in semantic_logger-3.4.0
- old
+ new
@@ -46,9 +46,17 @@
it '#unknown? as error? when false' do
SemanticLogger.default_level = :fatal
refute @logger.unknown?
end
+ it '#silence_logger' do
+ @logger.silence_logger do
+ @logger.info 'hello world'
+ end
+ SemanticLogger.flush
+ refute @mock_logger.message
+ end
+
it '#<< as info' do
@logger << 'hello world'
SemanticLogger.flush
assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world/, @mock_logger.message)
end