about summary refs log tree commit homepage
path: root/test/unit/test_http_parser.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-11-13 20:22:13 +0000
committerEric Wong <normalperson@yhbt.net>2012-11-13 20:22:13 +0000
commitf4af812a28b03508c96853739aea53f7a6714abf (patch)
treecbfe8ae9ae2a6c228f0176f93ff811030aade122 /test/unit/test_http_parser.rb
parent4bd0dbdf2d27672dc941746e06b647ea26fe63ee (diff)
downloadunicorn-f4af812a28b03508c96853739aea53f7a6714abf.tar.gz
assert_nothing_raised ends up hiding errors and backtraces,
making things harder to debug.  Since Test::Unit already
fails on uncaught exceptions, there is no need to assert
on the lack of exceptions for a successful test run.

This is a followup to commit 5acf5522295c947d3118926d1a1077007f615de9
Diffstat (limited to 'test/unit/test_http_parser.rb')
-rw-r--r--test/unit/test_http_parser.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb
index 797a449..64146e7 100644
--- a/test/unit/test_http_parser.rb
+++ b/test/unit/test_http_parser.rb
@@ -689,10 +689,7 @@ class HttpParserTest < Test::Unit::TestCase
       parser = HttpParser.new
       req = parser.env
       s = "#{m} /forums/1/topics/2375?page=1#posts-17408 HTTP/1.1\r\n\r\n"
-      ok = false
-      assert_nothing_raised do
-        ok = parser.headers(req, s)
-      end
+      ok = parser.headers(req, s)
       assert ok
       assert_equal '/forums/1/topics/2375?page=1', req['REQUEST_URI']
       assert_equal 'posts-17408', req['FRAGMENT']
@@ -708,10 +705,7 @@ class HttpParserTest < Test::Unit::TestCase
     req = parser.env
     get = "GET /forums/1/topics/2375?page=1#posts-17408 HTTP/1.1\r\n\r\n"
     parser.buf << get
-    ok = false
-    assert_nothing_raised do
-      ok = parser.parse
-    end
+    ok = parser.parse
     assert ok
     assert_equal '/forums/1/topics/2375?page=1', req['REQUEST_URI']
     assert_equal 'posts-17408', req['FRAGMENT']