diff options
Diffstat (limited to 'test/test_timeout.rb')
-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 1af61b7f8b..56b2469978 100644 --- a/test/test_timeout.rb +++ b/test/test_timeout.rb @@ -66,6 +66,11 @@ class TestTimeout < Test::Unit::TestCase sleep 3 end end + assert_raise_with_message(err, /connection to rubylang.org expired/) do + Timeout.timeout 0.01, err, "connection to rubylang.org expired" do + sleep 3 + end + end end def test_exit_exception |