diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-07 15:32:07 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-07 15:32:07 +0000 |
commit | b755bc4d0505c7488f15c9b15b4a8a606f9b6164 (patch) | |
tree | e8ec404ffe5a6fe44dad14b4cd82f0502c8492d2 /test/test_timeout.rb | |
parent | 67682ef55e8cc1a56a0a4fb7a33778ccd6a1dbb5 (diff) | |
download | ruby-b755bc4d0505c7488f15c9b15b4a8a606f9b6164.tar.gz ruby-b755bc4d0505c7488f15c9b15b4a8a606f9b6164.tar.xz ruby-b755bc4d0505c7488f15c9b15b4a8a606f9b6164.zip |
add tests.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_timeout.rb')
-rw-r--r-- | test/test_timeout.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_timeout.rb b/test/test_timeout.rb new file mode 100644 index 000000000..dfa863b37 --- /dev/null +++ b/test/test_timeout.rb @@ -0,0 +1,13 @@ +require 'test/unit' +require 'timeout' +require 'thread' + +class TestTimeout < Test::Unit::TestCase + def test_queue + q = Queue.new + assert_raise(Timeout::Error, "[ruby-dev:32935]") { + timeout(0.1) { q.pop } + } + end +end + |