test/logger_test.rb in semantic_logger-0.4.2 vs test/logger_test.rb in semantic_logger-0.5.0
- old
+ new
@@ -57,12 +57,13 @@
end
end
should "add payload to log entries" do
@logger.with_payload(:tracking_number => '123456') do
- @logger.with_payload(:more => 'data', :even => 2) do
+ @logger.with_payload(:even => 2, :more => 'data') do
@logger.info('Hello world')
SemanticLogger::Logger.flush
+ # TODO make test ignore order of Hash elements
assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ \w \[\d+:.+\] LoggerTest -- Hello world -- \{:even=>2, :more=>\"data\", :tracking_number=>\"123456\"\}/, @mock_logger.message
end
end
end
\ No newline at end of file