Sha256: 4afc2696eb7dc6a88a41b734f3154ad16028bdb039842f3ec1e4db2bda03ba3d
Contents?: true
Size: 671 Bytes
Versions: 6
Compression:
Stored size: 671 Bytes
Contents
# coding: utf-8 class TestNephosServerLogger < Test::Unit::TestCase FILE = "/tmp/nephos_test_#{Time.now}.log" def test_basic fd = File.open(FILE, "w") Nephos::Logger.fd = fd Nephos::Logger.write "coucou" assert_equal("coucou\n", File.read(FILE)) File.delete FILE fd = File.open(FILE, "w") Nephos::Logger.fd = fd Nephos::Logger.write %w(hello wôrld) assert_equal("hello\nwôrld\n", File.read(FILE)) File.delete FILE end def test_basic_shortcut fd = File.open(FILE, "w") Nephos::Logger.fd = fd Nephos.log %w(hello wôrld) assert_equal("hello\nwôrld\n", File.read(FILE)) File.delete FILE end end
Version data entries
6 entries across 6 versions & 1 rubygems