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

ruby-changes:40352

From: nobu <ko1@a...>
Date: Tue, 3 Nov 2015 21:15:45 +0900 (JST)
Subject: [ruby-changes:40352] nobu:r52433 (trunk): test_timeout.rb: exact messages

nobu	2015-11-03 21:15:31 +0900 (Tue, 03 Nov 2015)

  New Revision: 52433

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

  Log:
    test_timeout.rb: exact messages
    
    * test/test_timeout.rb (test_rescue_exit, test_custom_exception):
      assert with exact messages.

  Modified files:
    trunk/test/test_timeout.rb
Index: test/test_timeout.rb
===================================================================
--- test/test_timeout.rb	(revision 52432)
+++ test/test_timeout.rb	(revision 52433)
@@ -49,7 +49,7 @@ class TestTimeout < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_timeout.rb#L49
         end
       end
     end
-    assert_raise_with_message(exc, /execution expired/) {raise e if e}
+    assert_raise_with_message(exc, 'execution expired') {raise e if e}
   end
 
   def test_custom_exception
@@ -60,7 +60,7 @@ class TestTimeout < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_timeout.rb#L60
     assert_nothing_raised(ArgumentError, bug9354) do
       assert_equal(:ok, Timeout.timeout(100, err) {:ok})
     end
-    assert_raise_with_message(err, /execution expired/) do
+    assert_raise_with_message(err, 'execution expired') do
       Timeout.timeout 0.01, err do
         sleep 3
       end

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

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