add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cc3350f118
commit
05e52bf46b
14
test/test_tempfile.rb
Normal file
14
test/test_tempfile.rb
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
require 'test/unit'
|
||||||
|
require 'tempfile'
|
||||||
|
|
||||||
|
class TestTempfile < Test::Unit::TestCase
|
||||||
|
module M
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_extend
|
||||||
|
o = Tempfile.new("foo")
|
||||||
|
o.extend M
|
||||||
|
assert(M === o, "[ruby-dev:32932]")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
13
test/test_timeout.rb
Normal file
13
test/test_timeout.rb
Normal file
@ -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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user