Sha256: 7bb11c69c84d5a6a751e88565941e9bbf1c8fc0e116d23a37798192e87761d9a

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

require File.expand_path('../helper', __FILE__)

class TestRemoteSyslogLogger < Test::Unit::TestCase
  def setup
    @server_port = rand(50000) + 1024
    @socket = UDPSocket.new
    @socket.bind('127.0.0.1', @server_port)
  end
  
  def test_logger
    @logger = RemoteSyslogLogger.new('127.0.0.1', @server_port)
    @logger.info "This is a test"
    
    message, addr = *@socket.recvfrom(1024)
    puts message
    assert_match /This is a test/, message
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
remote_syslog_logger-1.0.0 test/test_remote_syslog_logger.rb