test/formatters_test.rb in semantic_logger-4.2.0 vs test/formatters_test.rb in semantic_logger-4.2.1

- old
+ new

@@ -16,18 +16,18 @@ assert formatter.is_a?(SemanticLogger::Formatters::Raw) assert_equal 'Test', formatter.call(log, appender)[:name] end it 'from a Hash (Symbol with options)' do - assert formatter = SemanticLogger::Formatters.factory(raw: {time_format: "%Y%m%d"}) + assert formatter = SemanticLogger::Formatters.factory(raw: {time_format: '%Y%m%d'}) assert formatter.is_a?(SemanticLogger::Formatters::Raw) assert result = formatter.call(log, appender) assert_equal 'Test', result[:name] - assert_equal Time.now.strftime("%Y%m%d"), result[:time] + assert_equal Time.now.strftime('%Y%m%d'), result[:time] end it 'from block' do - my_formatter = -> log, appender { log.name } + my_formatter = ->(log, _appender) { log.name } assert formatter = SemanticLogger::Formatters.factory(my_formatter) assert formatter.is_a?(Proc) assert_equal 'Test', formatter.call(log, appender) end end