diff --git a/test/test_timeout.rb b/test/test_timeout.rb index 0a8dc45..8bfe80c 100644 --- a/test/test_timeout.rb +++ b/test/test_timeout.rb @@ -19,6 +19,18 @@ def test_non_timing_out_code_is_successful end end + def test_allows_zero_seconds + assert_nothing_raised do + assert_equal :ok, Timeout.timeout(0){:ok} + end + end + + def test_allows_nil_seconds + assert_nothing_raised do + assert_equal :ok, Timeout.timeout(nil){:ok} + end + end + def test_included c = Class.new do include Timeout