[前][次][番号順一覧][スレッド一覧]

ruby-changes:67907

From: Hiroshi <ko1@a...>
Date: Sat, 11 Sep 2021 08:48:50 +0900 (JST)
Subject: [ruby-changes:67907] 9ff614bc13 (master): Use Test::Unit::Assertions migrated with MiniTest::Assertions

https://git.ruby-lang.org/ruby.git/commit/?id=9ff614bc13

From 9ff614bc13b946628852624fe0462be7d9660557 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Thu, 9 Sep 2021 15:10:00 +0900
Subject: Use Test::Unit::Assertions migrated with MiniTest::Assertions

---
 tool/test/testunit/test_assertion.rb     |  2 +-
 tool/test/testunit/test_minitest_unit.rb | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tool/test/testunit/test_assertion.rb b/tool/test/testunit/test_assertion.rb
index 0c7c488..91c2fc1 100644
--- a/tool/test/testunit/test_assertion.rb
+++ b/tool/test/testunit/test_assertion.rb
@@ -22,7 +22,7 @@ class TestAssertion < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/tool/test/testunit/test_assertion.rb#L22
   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 c0e32f5..b4e93d7 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 https://github.com/ruby/ruby/blob/trunk/tool/test/testunit/test_minitest_unit.rb#L1359
   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 https://github.com/ruby/ruby/blob/trunk/tool/test/testunit/test_minitest_unit.rb#L1438
   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 https://github.com/ruby/ruby/blob/trunk/tool/test/testunit/test_minitest_unit.rb#L1679
   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
 
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]