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:
parent
dd64c34682
commit
471a969311
1 changed files with 2 additions and 6 deletions
|
@ -217,8 +217,6 @@ class TestRefinement < Test::Unit::TestCase
|
||||||
assert_raise(NoMethodError) { FooExtClient.public_send_b_on(foo) }
|
assert_raise(NoMethodError) { FooExtClient.public_send_b_on(foo) }
|
||||||
end
|
end
|
||||||
|
|
||||||
DONE_TESTS = []
|
|
||||||
|
|
||||||
module MethodIntegerPowEx
|
module MethodIntegerPowEx
|
||||||
refine Integer do
|
refine Integer do
|
||||||
def pow(*)
|
def pow(*)
|
||||||
|
@ -227,8 +225,7 @@ class TestRefinement < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def test_method_should_use_refinements
|
def test_method_should_use_refinements
|
||||||
skip if DONE_TESTS.include? __method__ # giveup multi-run
|
skip if Minitest::Unit.current_repeat_count > 0
|
||||||
DONE_TESTS << __method__
|
|
||||||
|
|
||||||
foo = Foo.new
|
foo = Foo.new
|
||||||
assert_raise(NameError) { foo.method(:z) }
|
assert_raise(NameError) { foo.method(:z) }
|
||||||
|
@ -251,8 +248,7 @@ class TestRefinement < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def test_instance_method_should_use_refinements
|
def test_instance_method_should_use_refinements
|
||||||
skip if DONE_TESTS.include? __method__ # giveup multi-run
|
skip if Minitest::Unit.current_repeat_count > 0
|
||||||
DONE_TESTS << __method__
|
|
||||||
|
|
||||||
foo = Foo.new
|
foo = Foo.new
|
||||||
assert_raise(NameError) { Foo.instance_method(:z) }
|
assert_raise(NameError) { Foo.instance_method(:z) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue