mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Use test-unit instead of minitest
https://github.com/rubygems/rubygems/commit/a8571524ad
This commit is contained in:
parent
5a6af44e20
commit
cddeee21e9
Notes:
git
2021-05-12 17:25:24 +09:00
1 changed files with 9 additions and 8 deletions
|
@ -12,7 +12,7 @@ if File.exist?(bundler_gemspec)
|
|||
end
|
||||
|
||||
begin
|
||||
gem 'minitest', '~> 5.13'
|
||||
gem 'test-unit', '~> 3.0'
|
||||
rescue Gem::LoadError
|
||||
end
|
||||
|
||||
|
@ -41,7 +41,7 @@ end
|
|||
|
||||
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
|
|||
# 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
|
|||
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
|
|||
|
||||
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:
|
|||
|
||||
spec_fetcher.specs[@uri] = []
|
||||
all.each do |spec|
|
||||
|
||||
spec_fetcher.specs[@uri] << spec.name_tuple
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue