test/logger_test.rb in semantic_logger-2.5.0 vs test/logger_test.rb in semantic_logger-2.6.0

- old
+ new

@@ -36,21 +36,21 @@ SemanticLogger.flush assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ \w \[\d+:.+\] LoggerTest -- hello world -- Calculations -- #{@hash_str}/, @mock_logger.message end end - context "with_tags logging" do + context "tagged logging" do should "add tags to log entries" do - @logger.with_tags('12345', 'DJHSFK') do + @logger.tagged('12345', 'DJHSFK') do @logger.info('Hello world') SemanticLogger.flush assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ \w \[\d+:.+\] \[12345\] \[DJHSFK\] LoggerTest -- Hello world/, @mock_logger.message end end should "add embedded tags to log entries" do - @logger.with_tags('First Level', 'tags') do - @logger.with_tags('Second Level') do + @logger.tagged('First Level', 'tags') do + @logger.tagged('Second Level') do @logger.info('Hello world') SemanticLogger.flush assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ \w \[\d+:.+\] \[First Level\] \[tags\] \[Second Level\] LoggerTest -- Hello world/, @mock_logger.message end assert_equal 2, @logger.tags.count, @logger.tags \ No newline at end of file