Skip to content

Commit a857152

Browse files
committed
Use test-unit instead of minitest
1 parent d1c05f9 commit a857152

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lib/rubygems/test_case.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
end
1313

1414
begin
15-
gem 'minitest', '~> 5.13'
15+
gem 'test-unit', '~> 3.0'
1616
rescue Gem::LoadError
1717
end
1818

@@ -41,7 +41,7 @@
4141

4242
ENV["MT_NO_PLUGINS"] = "true"
4343

44-
require 'minitest/autorun'
44+
require 'test/unit'
4545

4646
ENV["JARS_SKIP"] = "true" if Gem.java_platform? # avoid unnecessary and noisy `jar-dependencies` post install hook
4747

@@ -111,7 +111,7 @@ def self.specific_extra_args_hash=(value)
111111
# and uninstall gems, fetch remote gems through a stub fetcher and be assured
112112
# your normal set of gems is not affected.
113113

114-
class Gem::TestCase < Minitest::Test
114+
class Gem::TestCase < Test::Unit::TestCase
115115
extend Gem::Deprecate
116116

117117
attr_accessor :fetcher # :nodoc:
@@ -140,7 +140,7 @@ def assert_activate(expected, *specs)
140140
end
141141

142142
def assert_directory_exists(path, msg = nil)
143-
msg = message(msg) { "Expected path '#{path}' to be a directory" }
143+
msg = build_message(msg, "Expected path '#{path}' to be a directory")
144144
assert_path_exists path
145145
assert File.directory?(path), msg
146146
end
@@ -262,19 +262,19 @@ def parse_make_command_line(line)
262262

263263
def assert_contains_make_command(target, output, msg = nil)
264264
if output.match(/\n/)
265-
msg = message(msg) do
265+
msg = build_message(msg,
266266
"Expected output containing make command \"%s\", but was \n\nBEGIN_OF_OUTPUT\n%sEND_OF_OUTPUT" % [
267267
('%s %s' % [make_command, target]).rstrip,
268268
output,
269269
]
270-
end
270+
)
271271
else
272-
msg = message(msg) do
272+
msg = build_message(msg,
273273
'Expected make command "%s": %s' % [
274274
('%s %s' % [make_command, target]).rstrip,
275275
output,
276276
]
277-
end
277+
)
278278
end
279279

280280
assert scan_make_command_lines(output).any? {|line|
@@ -1012,6 +1012,7 @@ def util_setup_spec_fetcher(*specs)
10121012

10131013
spec_fetcher.specs[@uri] = []
10141014
all.each do |spec|
1015+
10151016
spec_fetcher.specs[@uri] << spec.name_tuple
10161017
end
10171018

0 commit comments

Comments
 (0)