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:
parent
a60bf6f9bf
commit
1147136b8a
1 changed files with 4 additions and 0 deletions
|
@ -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]") {
|
||||
|
|
Loading…
Reference in a new issue