test/test_tcp_connect.rb in kgio-1.3.1 vs test/test_tcp_connect.rb in kgio-2.0.0pre1

- old
+ new

@@ -3,11 +3,11 @@ $-w = true require 'kgio' class SubSocket < Kgio::Socket attr_accessor :foo - def wait_writable + def kgio_wait_writable @foo = "waited" end end class TestKgioTcpConnect < Test::Unit::TestCase @@ -21,11 +21,10 @@ def teardown @srv.close unless @srv.closed? Kgio.accept_cloexec = true Kgio.accept_nonblock = false - Kgio.wait_readable = Kgio.wait_writable = nil end def test_new sock = Kgio::Socket.new(@addr) assert_kind_of Kgio::Socket, sock @@ -54,19 +53,17 @@ assert_equal sock, ready[1][0] assert_equal nil, sock.kgio_write("HELLO") end def test_socket_start - Kgio::wait_writable = :wait_writable sock = SubSocket.start(@addr) assert_nil sock.foo ready = IO.select(nil, [ sock ]) assert_equal sock, ready[1][0] assert_equal nil, sock.kgio_write("HELLO") end def test_wait_writable_set - Kgio::wait_writable = :wait_writable sock = SubSocket.new(@addr) assert_equal "waited", sock.foo assert_equal nil, sock.kgio_write("HELLO") end end