Use MiniTest
This commit is contained in:
parent
7456cbdd09
commit
871e7b5f55
Notes:
git
2021-09-11 08:48:42 +09:00
@ -225,7 +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 Minitest::Unit.current_repeat_count > 0
|
skip if MiniTest::Unit.current_repeat_count > 0
|
||||||
|
|
||||||
foo = Foo.new
|
foo = Foo.new
|
||||||
assert_raise(NameError) { foo.method(:z) }
|
assert_raise(NameError) { foo.method(:z) }
|
||||||
@ -248,7 +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 Minitest::Unit.current_repeat_count > 0
|
skip if MiniTest::Unit.current_repeat_count > 0
|
||||||
|
|
||||||
foo = Foo.new
|
foo = Foo.new
|
||||||
assert_raise(NameError) { Foo.instance_method(:z) }
|
assert_raise(NameError) { Foo.instance_method(:z) }
|
||||||
|
@ -110,7 +110,7 @@ class TestTime < Test::Unit::TestCase
|
|||||||
assert_equal(946684800, Time.utc(2000, 1, 1, 0, 0, 0).tv_sec)
|
assert_equal(946684800, Time.utc(2000, 1, 1, 0, 0, 0).tv_sec)
|
||||||
|
|
||||||
# Giveup to try 2nd test because some state is changed.
|
# Giveup to try 2nd test because some state is changed.
|
||||||
skip if Minitest::Unit.current_repeat_count > 0
|
skip if MiniTest::Unit.current_repeat_count > 0
|
||||||
|
|
||||||
assert_equal(0x7fffffff, Time.utc(2038, 1, 19, 3, 14, 7).tv_sec)
|
assert_equal(0x7fffffff, Time.utc(2038, 1, 19, 3, 14, 7).tv_sec)
|
||||||
assert_equal(0x80000000, Time.utc(2038, 1, 19, 3, 14, 8).tv_sec)
|
assert_equal(0x80000000, Time.utc(2038, 1, 19, 3, 14, 8).tv_sec)
|
||||||
@ -1168,7 +1168,7 @@ class TestTime < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_2038
|
def test_2038
|
||||||
# Giveup to try 2nd test because some state is changed.
|
# Giveup to try 2nd test because some state is changed.
|
||||||
skip if Minitest::Unit.current_repeat_count > 0
|
skip if MiniTest::Unit.current_repeat_count > 0
|
||||||
|
|
||||||
if no_leap_seconds?
|
if no_leap_seconds?
|
||||||
assert_equal(0x80000000, Time.utc(2038, 1, 19, 3, 14, 8).tv_sec)
|
assert_equal(0x80000000, Time.utc(2038, 1, 19, 3, 14, 8).tv_sec)
|
||||||
|
@ -596,7 +596,7 @@ module Test
|
|||||||
# Takes a block and wraps it with the runner's shared mutex.
|
# Takes a block and wraps it with the runner's shared mutex.
|
||||||
|
|
||||||
def synchronize
|
def synchronize
|
||||||
Minitest::Unit.runner.synchronize do
|
MiniTest::Unit.runner.synchronize do
|
||||||
yield
|
yield
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user