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

[ruby/timeout] test that yield is given number of seconds

https://github.com/ruby/timeout/commit/ec5a614334
This commit is contained in:
John Bachir 2021-09-24 23:15:52 +01:00 committed by git
parent a60bf6f9bf
commit 1147136b8a

View file

@ -10,6 +10,10 @@ class TestTimeout < Test::Unit::TestCase
end
end
def test_yield_param
assert_equal [5, :ok], Timeout.timeout(5){|s| [s, :ok] }
end
def test_queue
q = Thread::Queue.new
assert_raise(Timeout::Error, "[ruby-dev:32935]") {