summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-12-20 03:19:10 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-12-20 03:19:10 +0000
commitcbe6b4a37485a0fdd93c3439d97c8d17fda163f9 (patch)
tree9f72776515d5e3f853abdd2cf5e791c22616aa6d
parent4a1683e6076db236521081e2a3aac7a1ee22b061 (diff)
downloadredmine-cbe6b4a37485a0fdd93c3439d97c8d17fda163f9.tar.gz
redmine-cbe6b4a37485a0fdd93c3439d97c8d17fda163f9.zip
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
-rw-r--r--lib/tasks/redmine.rake11
1 files 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