diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-25 05:26:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-25 05:26:31 +0000 |
commit | 2c3656f5e8c14f2e88e2100eb5e9911b58f94d37 (patch) | |
tree | 566e68d6dd667ba2f2bd2814ab097c3b69b1e277 /test/test_tracer.rb | |
parent | 31637f00fcbaf7c92313e8bf673925b47abaad7f (diff) | |
download | ruby-2c3656f5e8c14f2e88e2100eb5e9911b58f94d37.tar.gz |
test: refine assertions
* test/test_prime.rb (test_eratosthenes_works_fine_after_timeout):
use assert_raise to check timeout.
* test/test_securerandom.rb: check if results are hexadecimal
strings, and refine failure messages.
* test/test_tracer.rb (test_tracer_with_option_r_without_gems):
use assert_equal to compare.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tracer.rb')
-rw-r--r-- | test/test_tracer.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/test_tracer.rb b/test/test_tracer.rb index ff3ba87be6..b4ed7fce9f 100644 --- a/test/test_tracer.rb +++ b/test/test_tracer.rb @@ -18,12 +18,7 @@ class TestTracer < Test::Unit::TestCase def test_tracer_with_option_r_without_gems assert_in_out_err(%w[--disable-gems -rtracer -e 1]) do |(*lines),| - case lines.size - when 1 - # do nothing - else - flunk "unexpected output from `ruby --disable-gems -rtracer -e 1`" - end + assert_equal 1, lines.size, "unexpected output from `ruby --disable-gems -rtracer -e 1`" assert_equal "#0:-e:1::-: 1", lines.last end end |