From f4af812a28b03508c96853739aea53f7a6714abf Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 13 Nov 2012 20:22:13 +0000 Subject: tests: remove assert_nothing_raised (part 2) 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 --- test/unit/test_http_parser.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'test/unit/test_http_parser.rb') 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'] -- cgit v1.2.3-24-ge0c7