1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-07-10 23:47:55 +00:00
parent 0f663b2449
commit 8d7058db47

View file

@ -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