test/concerns/compatibility_test.rb in semantic_logger-3.2.1 vs test/concerns/compatibility_test.rb in semantic_logger-3.3.0

- old
+ new

@@ -21,23 +21,23 @@ end it '#add' do @logger.add(Logger::INFO, 'hello world', 'progname') { 'Data' } SemanticLogger.flush - assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data -- \"progname\"/, @mock_logger.message + assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data -- \"progname\"/, @mock_logger.message) end it '#log' do @logger.log(Logger::FATAL, 'hello world', 'progname') { 'Data' } SemanticLogger.flush - assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ F \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data -- \"progname\"/, @mock_logger.message + assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ F \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data -- \"progname\"/, @mock_logger.message) end it '#unknown' do @logger.unknown('hello world') { 'Data' } SemanticLogger.flush - assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ E \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data/, @mock_logger.message + assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ E \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data/, @mock_logger.message) end it '#unknown? as error?' do SemanticLogger.default_level = :error assert @logger.unknown? @@ -49,11 +49,11 @@ end it '#<< as info' do @logger << 'hello world' SemanticLogger.flush - assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world/, @mock_logger.message + assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world/, @mock_logger.message) end it '#progname= as #name=' do assert_equal 'CompatibilityTest', @logger.name @logger.progname = 'NewTest' @@ -90,17 +90,17 @@ it '#close NOOP' do @logger.close @logger.info('hello world') { 'Data' } SemanticLogger.flush - assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data/, @mock_logger.message + assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data/, @mock_logger.message) end it '#reopen NOOP' do @logger.reopen @logger.info('hello world') { 'Data' } SemanticLogger.flush - assert_match /\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data/, @mock_logger.message + assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ I \[\d+:#{@thread_name}\] CompatibilityTest -- hello world -- Data/, @mock_logger.message) end end end