diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-11-13 20:22:13 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-11-13 20:22:13 +0000 |
commit | f4af812a28b03508c96853739aea53f7a6714abf (patch) | |
tree | cbfe8ae9ae2a6c228f0176f93ff811030aade122 /test/unit/test_http_parser.rb | |
parent | 4bd0dbdf2d27672dc941746e06b647ea26fe63ee (diff) | |
download | unicorn-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.rb | 10 |
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'] |