mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
use assert_raise
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
21f2c194bb
commit
ae042f21fb
30 changed files with 100 additions and 100 deletions
|
@ -79,9 +79,9 @@ class TestSocket_TCPSocket < Test::Unit::TestCase
|
|||
|
||||
def test_accept_nonblock
|
||||
TCPServer.open("localhost", 0) {|svr|
|
||||
assert_raises(IO::WaitReadable) { svr.accept_nonblock }
|
||||
assert_raise(IO::WaitReadable) { svr.accept_nonblock }
|
||||
assert_equal :wait_readable, svr.accept_nonblock(exception: false)
|
||||
assert_raises(IO::WaitReadable) { svr.accept_nonblock(exception: true) }
|
||||
assert_raise(IO::WaitReadable) { svr.accept_nonblock(exception: true) }
|
||||
}
|
||||
end
|
||||
end if defined?(TCPSocket)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue