diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-28 10:02:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-28 10:02:24 +0000 |
commit | 251d62c2bfd25b6ed27f03369c555b0d61e2ad70 (patch) | |
tree | 24e11f4f8f2b7a8b0eecd6484ec841e5d0fa4e21 /lib/tasks | |
parent | afbff44fb4c77e2a870e0a90dd76d137fe4619e9 (diff) | |
download | redmine-251d62c2bfd25b6ed27f03369c555b0d61e2ad70.tar.gz redmine-251d62c2bfd25b6ed27f03369c555b0d61e2ad70.zip |
Adds redmine:plugins:test rake tasks for running plugins tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9738 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/redmine.rake | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/tasks/redmine.rake b/lib/tasks/redmine.rake index 3d8fea591..d4dbdd901 100644 --- a/lib/tasks/redmine.rake +++ b/lib/tasks/redmine.rake @@ -82,6 +82,36 @@ namespace :redmine do abort "Plugin #{name} was not found." end end + + 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 + end + + namespace :test do + desc 'Runs the plugins unit tests.' + Rake::TestTask.new :units => "db:test:prepare" do |t| + t.libs << "test" + t.verbose = true + t.test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/unit/*_test.rb"] + end + + desc 'Runs the plugins functional tests.' + Rake::TestTask.new :functionals => "db:test:prepare" do |t| + t.libs << "test" + t.verbose = true + t.test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/functional/*_test.rb"] + end + + desc 'Runs the plugins integration tests.' + Rake::TestTask.new :integration => "db:test:prepare" do |t| + t.libs << "test" + t.verbose = true + t.test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/integration/*_test.rb"] + end + end end end |