test/measure_test.rb in semantic_logger-4.0.0 vs test/measure_test.rb in semantic_logger-4.1.0

- old
+ new

@@ -42,11 +42,11 @@ assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ #{level_char} \[\d+:#{@thread_name}\] \((\d+\.\d+)|(\d+)ms\) LoggerTest -- hello world -- #{@hash_str}/, @mock_logger.message) end describe ':min_duration' do it 'not log when faster' do - assert_equal 'result', @logger.send(measure_level, 'hello world', min_duration: 1000) { 'result' } # Measure duration of the supplied block + assert_equal 'result', @logger.send(measure_level, 'hello world', min_duration: 2000) { 'result' } # Measure duration of the supplied block SemanticLogger.flush assert_nil @mock_logger.message end it 'log when slower' do @@ -154,10 +154,10 @@ assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ #{level_char} \[\d+:#{@thread_name}\] \((\d+\.\d+)|(\d+)ms\) LoggerTest -- hello world -- #{@hash_str}/, @mock_logger.message) end describe ':min_duration' do it 'not log when faster' do - assert_equal 'result', @logger.send(measure_level, message: 'hello world', min_duration: 1000) { 'result' } # Measure duration of the supplied block + assert_equal 'result', @logger.send(measure_level, message: 'hello world', min_duration: 2000) { 'result' } # Measure duration of the supplied block SemanticLogger.flush assert_nil @mock_logger.message end it 'log when slower' do