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

ruby-changes:66165

From: Hiroshi <ko1@a...>
Date: Wed, 12 May 2021 17:25:07 +0900 (JST)
Subject: [ruby-changes:66165] cddeee21e9 (master): [rubygems/rubygems] Use test-unit instead of minitest

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

From cddeee21e992f1659ff9cb24d99e154aaba9daad Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Sat, 29 Jun 2019 20:16:36 +0900
Subject: [rubygems/rubygems] Use test-unit instead of minitest

https://github.com/rubygems/rubygems/commit/a8571524ad
---
 lib/rubygems/test_case.rb | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index e276356..7725561 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -12,7 +12,7 @@ if File.exist?(bundler_gemspec) https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L12
 end
 
 begin
-  gem 'minitest', '~> 5.13'
+  gem 'test-unit', '~> 3.0'
 rescue Gem::LoadError
 end
 
@@ -41,7 +41,7 @@ end https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L41
 
 ENV["MT_NO_PLUGINS"] = "true"
 
-require 'minitest/autorun'
+require 'test/unit'
 
 ENV["JARS_SKIP"] = "true" if Gem.java_platform? # avoid unnecessary and noisy `jar-dependencies` post install hook
 
@@ -111,7 +111,7 @@ end https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L111
 # and uninstall gems, fetch remote gems through a stub fetcher and be assured
 # your normal set of gems is not affected.
 
-class Gem::TestCase < Minitest::Test
+class Gem::TestCase < Test::Unit::TestCase
   extend Gem::Deprecate
 
   attr_accessor :fetcher # :nodoc:
@@ -140,7 +140,7 @@ class Gem::TestCase < Minitest::Test https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L140
   end
 
   def assert_directory_exists(path, msg = nil)
-    msg = message(msg) { "Expected path '#{path}' to be a directory" }
+    msg = build_message(msg, "Expected path '#{path}' to be a directory")
     assert_path_exists path
     assert File.directory?(path), msg
   end
@@ -262,19 +262,19 @@ class Gem::TestCase < Minitest::Test https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L262
 
   def assert_contains_make_command(target, output, msg = nil)
     if output.match(/\n/)
-      msg = message(msg) do
+      msg = build_message(msg,
         "Expected output containing make command \"%s\", but was \n\nBEGIN_OF_OUTPUT\n%sEND_OF_OUTPUT" % [
           ('%s %s' % [make_command, target]).rstrip,
           output,
         ]
-      end
+      )
     else
-      msg = message(msg) do
+      msg = build_message(msg,
         'Expected make command "%s": %s' % [
           ('%s %s' % [make_command, target]).rstrip,
           output,
         ]
-      end
+      )
     end
 
     assert scan_make_command_lines(output).any? {|line|
@@ -1012,6 +1012,7 @@ Also, a list: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L1012
 
     spec_fetcher.specs[@uri] = []
     all.each do |spec|
+
       spec_fetcher.specs[@uri] << spec.name_tuple
     end
 
-- 
cgit v1.1


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

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