spec/logger_spec.rb in ougai-1.5.0 vs spec/logger_spec.rb in ougai-1.5.2

- old
+ new

@@ -563,10 +563,16 @@ context 'another logger level is the same as original one' do before do logger.level = Logger::INFO # propagate severity to another one end + it 'does not output trace log on both loggers' do + logger.trace(log_msg, foo: 0) + expect(item).to be_nil + expect(another_item).to be_nil + end + it 'does not output debug log on both loggers' do logger.debug(log_msg, foo: 1) expect(item).to be_nil expect(another_item).to be_nil end @@ -600,23 +606,23 @@ end end context 'another logger level is lower than original one' do before do - logger.level = Logger::INFO - another_logger.level = Logger::DEBUG + logger.level = Logger::DEBUG + another_logger.level = :trace end - it 'outputs debug log on only another logger' do - logger.debug(log_msg) + it 'does not output trace log on both loggers' do + logger.trace(log_msg) expect(item).to be_nil - expect(another_item).to be_log_message(log_msg, 20) + expect(another_item).to be_log_message(log_msg, 10) end - it 'outputs info log on both loggers' do - logger.info(log_msg) - expect(item).to be_log_message(log_msg, 30) - expect(another_item).to be_log_message(log_msg, 30) + it 'outputs debug log on both loggers' do + logger.debug(log_msg) + expect(item).to be_log_message(log_msg, 20) + expect(another_item).to be_log_message(log_msg, 20) end end context 'another logger level is greater than original one' do before do