summaryrefslogtreecommitdiff
path: root/test/webrick
diff options
context:
space:
mode:
Diffstat (limited to 'test/webrick')
-rw-r--r--test/webrick/test_utils.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/webrick/test_utils.rb b/test/webrick/test_utils.rb
index e63e0eb..d7ef365 100644
--- a/test/webrick/test_utils.rb
+++ b/test/webrick/test_utils.rb
@@ -58,7 +58,11 @@ class TestWEBrickUtils < Test::Unit::TestCase
do_test_timeout(WEBrick::Utils)
end
- #def test_timeout
- # do_test_timeout(Timeout)
- #end
+ def test_create_listeners
+ listeners = WEBrick::Utils.create_listeners("127.0.0.1", "9999")
+ srv = listeners.first
+ assert_equal true, srv.is_a?(TCPServer)
+ assert_equal ["AF_INET", 9999, "127.0.0.1", "127.0.0.1"], srv.addr
+ end
+
end