test/appender/wrapper_test.rb in semantic_logger-4.2.0 vs test/appender/wrapper_test.rb in semantic_logger-4.2.1
- old
+ new
@@ -39,12 +39,12 @@
SemanticLogger.backtrace_level = :trace
@time = Time.new
@mock_logger = MockLogger.new
@appender = SemanticLogger::Appender::Wrapper.new(logger: @mock_logger)
- @hash = {session_id: 'HSSKLEU@JDK767', tracking_number: 12345}
- @hash_str = @hash.inspect.sub("{", "\\{").sub("}", "\\}")
+ @hash = {session_id: 'HSSKLEU@JDK767', tracking_number: 12_345}
+ @hash_str = @hash.inspect.sub('{', '\\{').sub('}', '\\}')
@thread_name = Thread.current.name
@file_name_reg_exp = ' wrapper_test.rb:\d+'
end
describe 'format logs into text form' do
@@ -88,9 +88,8 @@
SemanticLogger.flush
assert_match(/\d+-\d+-\d+ \d+:\d+:\d+.\d+ #{level_char} \[\d+:#{@thread_name}#{@file_name_reg_exp}\] Appender::WrapperTest -- hello world -- #{@hash_str}/, @mock_logger.message)
end
end
end
-
end
end
end