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

ruby-changes:59850

From: Koichi <ko1@a...>
Date: Tue, 28 Jan 2020 18:22:00 +0900 (JST)
Subject: [ruby-changes:59850] 471a969311 (master): use Minitest::Unit.current_repeat_count to skip multi-run.

https://git.ruby-lang.org/ruby.git/commit/?id=471a969311

From 471a9693118d0e6897b50dbbd935a237ad637398 Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Tue, 28 Jan 2020 18:20:06 +0900
Subject: use Minitest::Unit.current_repeat_count to skip multi-run.


diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
index 0db5988..c6707ff 100644
--- a/test/ruby/test_refinement.rb
+++ b/test/ruby/test_refinement.rb
@@ -217,8 +217,6 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L217
     assert_raise(NoMethodError) { FooExtClient.public_send_b_on(foo) }
   end
 
-  DONE_TESTS = []
-
   module MethodIntegerPowEx
     refine Integer do
       def pow(*)
@@ -227,8 +225,7 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L225
     end
   end
   def test_method_should_use_refinements
-    skip if DONE_TESTS.include? __method__ # giveup multi-run
-    DONE_TESTS << __method__
+    skip if Minitest::Unit.current_repeat_count > 0
 
     foo = Foo.new
     assert_raise(NameError) { foo.method(:z) }
@@ -251,8 +248,7 @@ class TestRefinement < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_refinement.rb#L248
     end
   end
   def test_instance_method_should_use_refinements
-    skip if DONE_TESTS.include? __method__ # giveup multi-run
-    DONE_TESTS << __method__
+    skip if Minitest::Unit.current_repeat_count > 0
 
     foo = Foo.new
     assert_raise(NameError) { Foo.instance_method(:z) }
-- 
cgit v0.10.2


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

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