aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-01-28 18:20:06 +0900
committerKoichi Sasada <ko1@atdot.net>2020-01-28 18:20:06 +0900
commit471a9693118d0e6897b50dbbd935a237ad637398 (patch)
treef22ce8200c5b594fdb819ca56e1a8d6f7a400725
parentdd64c34682bfcb976ec6fb0c6182fb09d9d790d3 (diff)
downloadruby-471a9693118d0e6897b50dbbd935a237ad637398.tar.gz
use Minitest::Unit.current_repeat_count to skip multi-run.
-rw-r--r--test/ruby/test_refinement.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
index 0db598888f..c6707ff54c 100644
--- a/test/ruby/test_refinement.rb
+++ b/test/ruby/test_refinement.rb
@@ -217,8 +217,6 @@ class TestRefinement < Test::Unit::TestCase
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
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
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) }