ruby-changes:57058
From: Nobuyoshi <ko1@a...>
Date: Fri, 16 Aug 2019 06:16:34 +0900 (JST)
Subject: [ruby-changes:57058] Nobuyoshi Nakada: 1a5304228a (master): Use test-unit instead of minitest
https://git.ruby-lang.org/ruby.git/commit/?id=1a5304228a From 1a5304228a03139b55821985856628cfe7362966 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 2 Dec 2018 11:36:45 +0900 Subject: Use test-unit instead of minitest Minitest 6 will err `assert_equal` with `nil`. https://github.com/seattlerb/minitest/issues/779 diff --git a/lib/rdoc/markup/formatter_test_case.rb b/lib/rdoc/markup/formatter_test_case.rb index 076b7c8..d1e8923 100644 --- a/lib/rdoc/markup/formatter_test_case.rb +++ b/lib/rdoc/markup/formatter_test_case.rb @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/lib/rdoc/markup/formatter_test_case.rb#L1 # frozen_string_literal: true -require 'minitest/unit' +require 'test-unit' ## # Test case for creating new RDoc::Markup formatters. See diff --git a/test/rdoc/minitest_helper.rb b/test/rdoc/minitest_helper.rb index 50e41eb..f22e416 100644 --- a/test/rdoc/minitest_helper.rb +++ b/test/rdoc/minitest_helper.rb @@ -1,13 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/test/rdoc/minitest_helper.rb#L1 # frozen_string_literal: true require 'bundler/errors' begin - gem 'minitest', '~> 5.0' + gem 'test-unit' rescue NoMethodError, Gem::LoadError, Bundler::GemfileNotFound # for ruby tests end -require 'minitest/autorun' -require 'minitest/benchmark' unless ENV['NOBENCHMARK'] +require 'test-unit' +# require 'minitest/benchmark' unless ENV['NOBENCHMARK'] require 'fileutils' require 'pp' @@ -30,7 +30,7 @@ require 'rdoc' https://github.com/ruby/ruby/blob/trunk/test/rdoc/minitest_helper.rb#L30 # * <code>@pwd</code> containing the current working directory # * FileUtils, pp, Tempfile, Dir.tmpdir and StringIO -class RDoc::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase) +class RDoc::TestCase < Test::Unit::TestCase ## # Abstract test-case setup @@ -202,4 +202,7 @@ class RDoc::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Un https://github.com/ruby/ruby/blob/trunk/test/rdoc/minitest_helper.rb#L202 end end end + + alias capture_io capture_output + alias skip omit end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/