test/logger_test.rb in semantic_logger-2.2.0 vs test/logger_test.rb in semantic_logger-2.3.0

- old
+ new

@@ -19,10 +19,11 @@ # Use this test's class name as the application name in the log output @logger = SemanticLogger::Logger.new(self.class, :trace) @hash = { :session_id => 'HSSKLEU@JDK767', :tracking_number => 12345 } @hash_str = @hash.inspect.sub("{", "\\{").sub("}", "\\}") + assert_equal [], @logger.tags end teardown do # Remove all appenders SemanticLogger.appenders.each{|appender| SemanticLogger.remove_appender(appender)} @@ -51,9 +52,12 @@ @logger.with_tags('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 + assert_equal 'First Level', @logger.tags.first + assert_equal 'tags', @logger.tags.last end end should "add payload to log entries" do hash = {:tracking_number=>"123456", :even=>2, :more=>"data"} \ No newline at end of file