summaryrefslogtreecommitdiff
path: root/test/webrick
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-02 06:53:12 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-02 06:53:12 +0000
commit73fc0cc57276b6aef3f5301fd3987b1b6d1dd296 (patch)
tree6acca69a6945ef10a5b82cf9b16e3bd92454886e /test/webrick
parent045de8a9c56aa1a8f9cef89e0bf0e533fa994d32 (diff)
* lib/webrick/utils.rb: removed unused argument variable.
[fix GH-356] Patch by @vipulnsward * lib/webrick/server.rb: ditto. * lib/webrick/ssl.rb: ditto. * test/webrick/test_utils.rb: added test for WEBrick::Utils#create_listeners. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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