Skip to content

Commit fef9d07

Browse files
t-mangoeeregon
authored andcommitted
add test case for string argument
1 parent ab79dff commit fef9d07

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_timeout.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ def test_raise_for_neg_second
5454
end
5555
end
5656

57+
def test_raise_for_string_argument
58+
assert_raise(NoMethodError) do
59+
Timeout.timeout("1") { sleep(0.01) }
60+
end
61+
end
62+
5763
def test_included
5864
c = Class.new do
5965
include Timeout

0 commit comments

Comments
 (0)