[rubygems/rubygems] Use `Minitest::TestTask` in a template file for `minitest`

`minitest` has introduced a rake task for running test on 5.16.0.
https://github.com/minitest/minitest/blob/master/History.rdoc#5160--2022-06-14-

This has some tasks related to running tests and it's useful for
`minitest` user I think.
https://github.com/minitest/minitest#rake-tasks-

This PR changed to use the task in a template file for `minitest`

https://github.com/rubygems/rubygems/commit/7a86d13062
This commit is contained in:
Yuji Yaginuma 2023-12-08 11:10:14 +09:00 коммит произвёл git
Родитель ac5fd58700
Коммит 8bb90f4d77
3 изменённых файлов: 5 добавлений и 13 удалений

Просмотреть файл

@ -11,7 +11,7 @@ module Bundler
class CLI::Gem
TEST_FRAMEWORK_VERSIONS = {
"rspec" => "3.0",
"minitest" => "5.0",
"minitest" => "5.16",
"test-unit" => "3.0",
}.freeze

Просмотреть файл

@ -4,13 +4,9 @@ require "bundler/gem_tasks"
<% default_task_names = [config[:test_task]].compact -%>
<% case config[:test] -%>
<% when "minitest" -%>
require "rake/testtask"
require "minitest/test_task"
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/test_*.rb"]
end
Minitest::TestTask.create
<% when "test-unit" -%>
require "rake/testtask"

Просмотреть файл

@ -801,13 +801,9 @@ RSpec.describe "bundle gem" do
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/testtask"
require "minitest/test_task"
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/test_*.rb"]
end
Minitest::TestTask.create
task default: :test
RAKEFILE