ruby-changes:61060
From: Hiroshi <ko1@a...>
Date: Fri, 8 May 2020 07:39:25 +0900 (JST)
Subject: [ruby-changes:61060] 1fe2b7f41c (master): Workaround for Minitest5
https://git.ruby-lang.org/ruby.git/commit/?id=1fe2b7f41c From 1fe2b7f41caf1868917bab5e698d25dae2bce85b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Thu, 7 May 2020 20:19:42 +0900 Subject: Workaround for Minitest5 diff --git a/tool/lib/minitest/unit.rb b/tool/lib/minitest/unit.rb index 7090f8a..5d24d0e 100644 --- a/tool/lib/minitest/unit.rb +++ b/tool/lib/minitest/unit.rb @@ -181,10 +181,12 @@ module MiniTest https://github.com/ruby/ruby/blob/trunk/tool/lib/minitest/unit.rb#L181 def _assertions= n # :nodoc: @_assertions = n end + alias assertions= _assertions= def _assertions # :nodoc: @_assertions ||= 0 end + alias assertions _assertions ## # Fails unless +test+ is a true value. diff --git a/tool/test/minitest/test_minitest_unit.rb b/tool/test/minitest/test_minitest_unit.rb index 1286b15..5476cf9 100644 --- a/tool/test/minitest/test_minitest_unit.rb +++ b/tool/test/minitest/test_minitest_unit.rb @@ -1372,6 +1372,9 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/tool/test/minitest/test_minitest_unit.rb#L1372 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/