From: Marius Balteanu Date: Wed, 20 Dec 2023 03:19:10 +0000 (+0000) Subject: Fixes that @redmine:plugins:test@ should run plugins unit, functional, integration... X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cbe6b4a37485a0fdd93c3439d97c8d17fda163f9;p=redmine.git Fixes that @redmine:plugins:test@ should run plugins unit, functional, integration and system tests in one single test session instead of one session for each type of test. This behaviour was changed in Rails 7.1 because @rake test@ and @rails test@ are integrated (#39803, #36320). git-svn-id: https://svn.redmine.org/redmine/trunk@22524 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/tasks/redmine.rake b/lib/tasks/redmine.rake index aa86d3532..63717c503 100644 --- a/lib/tasks/redmine.rake +++ b/lib/tasks/redmine.rake @@ -169,10 +169,13 @@ DESC desc 'Runs the plugins tests.' task :test do - Rake::Task["redmine:plugins:test:units"].invoke - Rake::Task["redmine:plugins:test:functionals"].invoke - Rake::Task["redmine:plugins:test:integration"].invoke - Rake::Task["redmine:plugins:test:system"].invoke + $: << "test" + Rails::TestUnit::Runner.run_from_rake 'test', FileList[ + "plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb", + "plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb", + "plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb", + "plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb" + ] end namespace :test do