Only run test for gem templates in Ruby < 3.1

This commit is contained in:
Rafael Mendonça França 2022-01-06 00:48:06 +00:00
parent aa3a6c9c1b
commit 110eeabf5c
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ HELP
end
task :test do
templates = Dir.glob("bug_report_templates/*.rb")
templates = if RUBY_VERSION < "3.1.0"
Dir.glob("bug_report_templates/*.rb")
else
Dir.glob("bug_report_templates/*_main.rb")
end
counter = templates.count do |file|
puts "--- Running #{file}"
Bundler.unbundled_system(Gem.ruby, "-w", file) ||