зеркало из https://github.com/github/ruby.git
[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:
Родитель
ac5fd58700
Коммит
8bb90f4d77
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче