1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

use Minitest::Unit.current_repeat_count to skip multi-run.

This commit is contained in:
Koichi Sasada 2020-01-28 18:20:06 +09:00
parent dd64c34682
commit 471a969311

View file

@ -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) }