Permalink
Browse files

Remove unneeded method redirect_test_io

  • Loading branch information...
1 parent 5b78938 commit 26f2d462aaedba3d343f488df7a46cd3b047d637 @spastorino spastorino committed Jun 30, 2012
Showing with 6 additions and 18 deletions.
  1. +6 −14 test/test_ws.rb
  2. +0 −4 test/testhelp.rb
View
@@ -25,15 +25,11 @@ def setup
@server = Server.new @tester, Events.strings
@server.add_tcp_listener "127.0.0.1", 9998
- redirect_test_io do
- @server.run
- end
+ @server.run
end
def teardown
- redirect_test_io do
- @server.stop(true)
- end
+ @server.stop(true)
end
def test_simple_server
@@ -73,17 +69,13 @@ def test_close_client
end
def test_bad_client
- redirect_test_io do
- do_test("GET /test HTTP/BAD", 3)
- end
+ do_test("GET /test HTTP/BAD", 3)
end
def test_header_is_too_long
- redirect_test_io do
- long = "GET /test HTTP/1.1\r\n" + ("X-Big: stuff\r\n" * 15000) + "\r\n"
- assert_raises Errno::ECONNRESET, Errno::EPIPE, Errno::ECONNABORTED, Errno::EINVAL, IOError do
- do_test(long, long.length/2, 10)
- end
+ long = "GET /test HTTP/1.1\r\n" + ("X-Big: stuff\r\n" * 15000) + "\r\n"
+ assert_raises Errno::ECONNRESET, Errno::EPIPE, Errno::ECONNABORTED, Errno::EINVAL, IOError do
+ do_test(long, long.length/2, 10)
end
end
View
@@ -16,10 +16,6 @@
require 'puma'
-def redirect_test_io
- yield
-end
-
# Either takes a string to do a get request against, or a tuple of [URI, HTTP] where
# HTTP is some kind of Net::HTTP request object (POST, HEAD, etc.)
def hit(uris)

0 comments on commit 26f2d46

Please sign in to comment.