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_stream_input.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_stream_input.rb')
-rw-r--r-- | test/unit/test_stream_input.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/unit/test_stream_input.rb b/test/unit/test_stream_input.rb index f59157a..1a07ec3 100644 --- a/test/unit/test_stream_input.rb +++ b/test/unit/test_stream_input.rb @@ -85,8 +85,7 @@ class TestStreamInput < Test::Unit::TestCase assert_equal '....', si.read(4), "nr=#{x}" } assert_nil si.read(1) - status = nil - assert_nothing_raised { pid, status = Process.waitpid2(pid) } + pid, status = Process.waitpid2(pid) assert status.success? end @@ -101,13 +100,13 @@ class TestStreamInput < Test::Unit::TestCase @wr.close } @wr.close - assert_nothing_raised { line = si.gets } + line = si.gets assert_equal(4096 * 4 * 3 + 5 + $/.size, line.size) assert_equal("hello" << ("ffff" * 4096 * 3) << "#$/", line) - assert_nothing_raised { line = si.gets } + line = si.gets assert_equal "foo#$/", line assert_nil si.gets - assert_nothing_raised { pid, status = Process.waitpid2(pid) } + pid, status = Process.waitpid2(pid) assert status.success? end |