From cbe6b4a37485a0fdd93c3439d97c8d17fda163f9 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Wed, 20 Dec 2023 03:19:10 +0000 Subject: [PATCH] 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 --- lib/tasks/redmine.rake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 -- 2.39.5