mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-19 15:38:17 +00:00
git-svn-id: https://svn.redmine.org/redmine/trunk@22525 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cbe6b4a374
commit
38e40d5c13
@ -169,44 +169,62 @@ DESC
|
|||||||
|
|
||||||
desc 'Runs the plugins tests.'
|
desc 'Runs the plugins tests.'
|
||||||
task :test do
|
task :test do
|
||||||
$: << "test"
|
test_files = FileList[
|
||||||
Rails::TestUnit::Runner.run_from_rake 'test', FileList[
|
|
||||||
"plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb",
|
"plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb",
|
||||||
"plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb",
|
"plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb",
|
||||||
"plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb",
|
"plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb",
|
||||||
"plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"
|
"plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"
|
||||||
]
|
]
|
||||||
|
if test_files.any?
|
||||||
|
$: << "test"
|
||||||
|
Rails::TestUnit::Runner.run_from_rake 'test', test_files
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace :test do
|
namespace :test do
|
||||||
desc 'Runs the plugins unit tests.'
|
desc 'Runs the plugins unit tests.'
|
||||||
task :units => "db:test:prepare" do |t|
|
task :units => "db:test:prepare" do |t|
|
||||||
$: << "test"
|
test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"]
|
||||||
Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"]
|
if test_files.any?
|
||||||
|
$: << "test"
|
||||||
|
Rails::TestUnit::Runner.run_from_rake 'test', test_files
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Runs the plugins functional tests.'
|
desc 'Runs the plugins functional tests.'
|
||||||
task :functionals => "db:test:prepare" do |t|
|
task :functionals => "db:test:prepare" do |t|
|
||||||
$: << "test"
|
test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"]
|
||||||
Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"]
|
if test_files.any?
|
||||||
|
$: << "test"
|
||||||
|
Rails::TestUnit::Runner.run_from_rake 'test', test_files
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Runs the plugins integration tests.'
|
desc 'Runs the plugins integration tests.'
|
||||||
task :integration => "db:test:prepare" do |t|
|
task :integration => "db:test:prepare" do |t|
|
||||||
$: << "test"
|
test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"]
|
||||||
Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"]
|
if test_files.any?
|
||||||
|
$: << "test"
|
||||||
|
Rails::TestUnit::Runner.run_from_rake 'test', test_files
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Runs the plugins system tests.'
|
desc 'Runs the plugins system tests.'
|
||||||
task :system => "db:test:prepare" do |t|
|
task :system => "db:test:prepare" do |t|
|
||||||
$: << "test"
|
test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"]
|
||||||
Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"]
|
if test_files.any?
|
||||||
|
$: << "test"
|
||||||
|
Rails::TestUnit::Runner.run_from_rake 'test', test_files
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Runs the plugins ui tests.'
|
desc 'Runs the plugins ui tests.'
|
||||||
task :ui => "db:test:prepare" do |t|
|
task :ui => "db:test:prepare" do |t|
|
||||||
$: << "test"
|
test_files = FileList["plugins/#{ENV['NAME'] || '*'}/test/ui/**/*_test.rb"]
|
||||||
Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/ui/**/*_test.rb"]
|
if test_files.any?
|
||||||
|
$: << "test"
|
||||||
|
Rails::TestUnit::Runner.run_from_rake 'test', test_files
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user