diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-10 23:47:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-10 23:47:55 +0000 |
commit | 7cb44272c108c5238fe5c4d1c4ee947fb0dbf41c (patch) | |
tree | c0f92f201dea1122b675ff2fc88ed8ac3491c6a1 /test | |
parent | c15d95708f1fb5628f3eef5152e0828328b1cd6c (diff) | |
download | ruby-7cb44272c108c5238fe5c4d1c4ee947fb0dbf41c.tar.gz |
test_timeout.rb: add an assertion
* test/test_timeout.rb (test_custom_exception): assert that the
given exception will raise on timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/test_timeout.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_timeout.rb b/test/test_timeout.rb index e4eba7f902..fcaf7154d7 100644 --- a/test/test_timeout.rb +++ b/test/test_timeout.rb @@ -60,6 +60,11 @@ class TestTimeout < Test::Unit::TestCase assert_nothing_raised(ArgumentError, bug9354) do assert_equal(:ok, timeout(100, err) {:ok}) end + assert_raise_with_message(err, /execution expired/) do + timeout 0.01, err do + sleep 3 + end + end end def test_exit_exception |