test/appender/syslog_test.rb in semantic_logger-3.2.1 vs test/appender/syslog_test.rb in semantic_logger-3.3.0
- old
+ new
@@ -13,11 +13,11 @@
Syslog.stub(:log, -> level, msg { message = msg }) do
syslog_appender = SemanticLogger::Appender::Syslog.new(level: :debug)
syslog_appender.debug 'AppenderSyslogTest log message'
end
end
- assert_match /D (.*?) SemanticLogger::Appender::Syslog -- AppenderSyslogTest log message/, message
+ assert_match(/D (.*?) SemanticLogger::Appender::Syslog -- AppenderSyslogTest log message/, message)
end
it 'handle remote syslog over TCP' do
message = nil
Net::TCPClient.stub_any_instance(:closed?, false) do
@@ -26,19 +26,19 @@
syslog_appender.remote_syslog.stub(:write, Proc.new { |data| message = data }) do
syslog_appender.debug 'AppenderSyslogTest log message'
end
end
end
- assert_match /<70>(.*?)SemanticLogger::Appender::Syslog -- AppenderSyslogTest log message\r\n/, message
+ assert_match(/<70>(.*?)SemanticLogger::Appender::Syslog -- AppenderSyslogTest log message\r\n/, message)
end
it 'handle remote syslog over UDP' do
message = nil
syslog_appender = SemanticLogger::Appender::Syslog.new(server: 'udp://localhost:88888', level: :debug)
UDPSocket.stub_any_instance(:send, -> msg, num, host, port { message = msg }) do
syslog_appender.debug 'AppenderSyslogTest log message'
end
- assert_match /<70>(.*?)SemanticLogger::Appender::Syslog -- AppenderSyslogTest log message/, message
+ assert_match(/<70>(.*?)SemanticLogger::Appender::Syslog -- AppenderSyslogTest log message/, message)
end
# Should be able to log each level.
SemanticLogger::LEVELS.each do |level|
it "log #{level} information" do