Skip to content

Commit d62d22d

Browse files
committed
test that yield is given number of seconds
1 parent 810592d commit d62d22d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/test_timeout.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ def test_non_timing_out_code_is_successful
1010
end
1111
end
1212

13+
def test_yield_param
14+
assert_equal [5, :ok], Timeout.timeout(5){|s| [s, :ok] }
15+
end
16+
1317
def test_queue
1418
q = Thread::Queue.new
1519
assert_raise(Timeout::Error, "[ruby-dev:32935]") {

0 commit comments

Comments
 (0)