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

ruby-changes:67899

From: Hiroshi <ko1@a...>
Date: Sat, 11 Sep 2021 08:48:35 +0900 (JST)
Subject: [ruby-changes:67899] 0fda70e3a3 (master): We don't want to consistent assert and refute assertions

https://git.ruby-lang.org/ruby.git/commit/?id=0fda70e3a3

From 0fda70e3a3833c1ee82ad06c22aa7436027cccc0 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Thu, 9 Sep 2021 20:56:53 +0900
Subject: We don't want to consistent assert and refute assertions

---
 tool/test/testunit/test_minitest_unit.rb | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/tool/test/testunit/test_minitest_unit.rb b/tool/test/testunit/test_minitest_unit.rb
index 9d2b086a..84e426a 100644
--- a/tool/test/testunit/test_minitest_unit.rb
+++ b/tool/test/testunit/test_minitest_unit.rb
@@ -1100,32 +1100,6 @@ class TestMiniTestUnitTestCase < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/tool/test/testunit/test_minitest_unit.rb#L1100
     end
   end
 
-  def test_class_asserts_match_refutes
-    @assertion_count = 0
-
-    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
-    # useless and will never be added, so don't bother.
-    ignores = %w[assert_output assert_raise assert_send
-                 assert_silent assert_throws]
-
-    # These are test/unit methods. I'm not actually sure why they're still here
-    ignores += %w[assert_no_match assert_not_equal assert_not_nil
-                  assert_not_same assert_nothing_raised
-                  assert_nothing_thrown assert_raise]
-
-    # These are compatibility methods for Minitest 5
-    ignores += %w[assertions assertions=]
-
-    asserts = methods.grep(/^assert/).sort - ignores
-    refutes = methods.grep(/^refute/).sort - ignores
-
-    assert_empty refutes.map { |n| n.sub(/^refute/, 'assert') } - asserts
-    assert_empty asserts.map { |n| n.sub(/^assert/, 'refute') } - refutes
-  end
-
   def test_flunk
     util_assert_triggered 'Epic Fail!' do
       @tc.flunk
-- 
cgit v1.1


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

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