diff options
| author | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2023-12-08 11:10:14 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-12-08 03:25:43 +0000 |
| commit | 8bb90f4d771d287644a3cf21bdda26c637f091e2 (patch) | |
| tree | 6af73dc91fa2046535243615f555f361bee84c37 /lib | |
| parent | ac5fd58700b5576bfdd89ffe06dd4302b6721e5f (diff) | |
[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
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bundler/cli/gem.rb | 2 | ||||
| -rw-r--r-- | lib/bundler/templates/newgem/Rakefile.tt | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index 63d18f4ae3..98192d952e 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -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 diff --git a/lib/bundler/templates/newgem/Rakefile.tt b/lib/bundler/templates/newgem/Rakefile.tt index 77f8a02530..172183d4b4 100644 --- a/lib/bundler/templates/newgem/Rakefile.tt +++ b/lib/bundler/templates/newgem/Rakefile.tt @@ -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" |
