summaryrefslogtreecommitdiff
path: root/tool/test
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-09 15:10:00 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-11 08:48:03 +0900
commit9ff614bc13b946628852624fe0462be7d9660557 (patch)
treedd6e5fec8adce3a03d5ae9adb766e2b4c5fc6bd4 /tool/test
parentad979a5e00996881a06a5863a607009ed7e13320 (diff)
Use Test::Unit::Assertions migrated with MiniTest::Assertions
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4813
Diffstat (limited to 'tool/test')
-rw-r--r--tool/test/testunit/test_assertion.rb2
-rw-r--r--tool/test/testunit/test_minitest_unit.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/tool/test/testunit/test_assertion.rb b/tool/test/testunit/test_assertion.rb
index 0c7c4882b8..91c2fc1e21 100644
--- a/tool/test/testunit/test_assertion.rb
+++ b/tool/test/testunit/test_assertion.rb
@@ -22,7 +22,7 @@ class TestAssertion < Test::Unit::TestCase
end
def test_assert_raise
- assert_raise(MiniTest::Assertion) do
+ assert_raise(Test::Assertion) do
return_in_assert_raise
end
end
diff --git a/tool/test/testunit/test_minitest_unit.rb b/tool/test/testunit/test_minitest_unit.rb
index c0e32f5883..b4e93d7327 100644
--- a/tool/test/testunit/test_minitest_unit.rb
+++ b/tool/test/testunit/test_minitest_unit.rb
@@ -1359,7 +1359,7 @@ class TestMiniTestUnitTestCase < Test::Unit::TestCase
def test_class_asserts_match_refutes
@assertion_count = 0
- methods = Test::Assertions.public_instance_methods
+ methods = Test::Unit::Assertions.public_instance_methods
methods.map! { |m| m.to_s } if Symbol === methods.first
# These don't have corresponding refutes _on purpose_. They're
@@ -1438,7 +1438,7 @@ class TestMiniTestUnitTestCase < Test::Unit::TestCase
end
def test_prints
- printer = Class.new { extend Test::Assertions }
+ printer = Class.new { extend Test::Unit::Assertions }
@tc.assert_equal '"test"', printer.mu_pp(ImmutableString.new 'test')
end
@@ -1679,12 +1679,12 @@ class TestMiniTestUnitTestCase < Test::Unit::TestCase
end
def without_diff
- old_diff = Test::Assertions.diff
- Test::Assertions.diff = nil
+ old_diff = Test::Unit::Assertions.diff
+ Test::Unit::Assertions.diff = nil
yield
ensure
- Test::Assertions.diff = old_diff
+ Test::Unit::Assertions.diff = old_diff
end
end