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

ruby-changes:39506

From: nobu <ko1@a...>
Date: Sat, 15 Aug 2015 13:34:37 +0900 (JST)
Subject: [ruby-changes:39506] nobu:r51587 (trunk): use assert_raise

nobu	2015-08-15 13:34:07 +0900 (Sat, 15 Aug 2015)

  New Revision: 51587

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

  Log:
    use assert_raise
    
    * test/openssl/test_ssl.rb: use assert_raise instead of a
      deprecated method.

  Modified files:
    trunk/test/openssl/test_ssl.rb
Index: test/openssl/test_ssl.rb
===================================================================
--- test/openssl/test_ssl.rb	(revision 51586)
+++ test/openssl/test_ssl.rb	(revision 51587)
@@ -33,7 +33,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTes https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl.rb#L33
     ctx = OpenSSL::SSL::SSLContext.new
     options = ctx.options
     ctx.setup
-    assert_raises(RuntimeError) do
+    assert_raise(RuntimeError) do
       ctx.options = options
     end
   end
@@ -707,12 +707,12 @@ class OpenSSL::TestSSL < OpenSSL::SSLTes https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl.rb#L707
     s1 = OpenSSL::SSL::SSLSocket.new(sock1, ctx1)
     s1.hostname = hostname
     t = Thread.new {
-      assert_raises(OpenSSL::SSL::SSLError) do
+      assert_raise(OpenSSL::SSL::SSLError) do
         s1.connect
       end
     }
 
-    assert_raises(ArgumentError) do
+    assert_raise(ArgumentError) do
       s2.accept
     end
 
@@ -1029,7 +1029,7 @@ if OpenSSL::OPENSSL_VERSION_NUMBER >= 0x https://github.com/ruby/ruby/blob/trunk/test/openssl/test_ssl.rb#L1029
     ctx_proc = Proc.new { |ctx|
       ctx.alpn_select_cb = -> (protocols) { nil }
     }
-    assert_raises(MiniTest::Assertion) do # minitest/assertion comes from `assert_join_threads`
+    assert_raise(MiniTest::Assertion) do # minitest/assertion comes from `assert_join_threads`
       start_server_version(:SSLv23, ctx_proc) { |server, port|
         ctx = OpenSSL::SSL::SSLContext.new
         ctx.alpn_protocols = ["http/1.1"]

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

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