[前][次][番号順一覧][スレッド一覧]

ruby-changes:38449

From: nobu <ko1@a...>
Date: Mon, 18 May 2015 18:42:11 +0900 (JST)
Subject: [ruby-changes:38449] nobu:r50530 (trunk): test_nonblock.rb: refine failure message

nobu	2015-05-18 18:41:37 +0900 (Mon, 18 May 2015)

  New Revision: 50530

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50530

  Log:
    test_nonblock.rb: refine failure message
    
    * test/socket/test_nonblock.rb (test_accept_nonblock): refine
      assertion for better failure message.

  Modified files:
    trunk/test/socket/test_nonblock.rb
Index: test/socket/test_nonblock.rb
===================================================================
--- test/socket/test_nonblock.rb	(revision 50529)
+++ test/socket/test_nonblock.rb	(revision 50530)
@@ -26,7 +26,7 @@ class TestSocketNonblock < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/socket/test_nonblock.rb#L26
     end
     assert_equal(Socket.unpack_sockaddr_in(c.getsockname), Socket.unpack_sockaddr_in(sockaddr))
     if s.respond_to?(:nonblock?)
-      assert s.nonblock?, 'accepted socket is non-blocking'
+      assert_predicate(s, :nonblock?, 'accepted socket is non-blocking')
     end
   ensure
     serv.close if serv

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]