remove trailing white-spaces from lib/tasks/testing.rake.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6270 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cbcf2bdc79
commit
98b29b445d
|
@ -30,16 +30,16 @@ namespace :test do
|
||||||
task :create_dir do
|
task :create_dir do
|
||||||
FileUtils.mkdir_p Rails.root + '/tmp/test'
|
FileUtils.mkdir_p Rails.root + '/tmp/test'
|
||||||
end
|
end
|
||||||
|
|
||||||
supported_scms = [:subversion, :cvs, :bazaar, :mercurial, :git, :darcs, :filesystem]
|
supported_scms = [:subversion, :cvs, :bazaar, :mercurial, :git, :darcs, :filesystem]
|
||||||
|
|
||||||
desc "Creates a test subversion repository"
|
desc "Creates a test subversion repository"
|
||||||
task :subversion => :create_dir do
|
task :subversion => :create_dir do
|
||||||
repo_path = "tmp/test/subversion_repository"
|
repo_path = "tmp/test/subversion_repository"
|
||||||
system "svnadmin create #{repo_path}"
|
system "svnadmin create #{repo_path}"
|
||||||
system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}"
|
system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Creates a test mercurial repository"
|
desc "Creates a test mercurial repository"
|
||||||
task :mercurial => :create_dir do
|
task :mercurial => :create_dir do
|
||||||
repo_path = "tmp/test/mercurial_repository"
|
repo_path = "tmp/test/mercurial_repository"
|
||||||
|
@ -47,7 +47,7 @@ namespace :test do
|
||||||
system "hg init #{repo_path}"
|
system "hg init #{repo_path}"
|
||||||
system "hg -R #{repo_path} pull #{bundle_path}"
|
system "hg -R #{repo_path} pull #{bundle_path}"
|
||||||
end
|
end
|
||||||
|
|
||||||
(supported_scms - [:subversion, :mercurial]).each do |scm|
|
(supported_scms - [:subversion, :mercurial]).each do |scm|
|
||||||
desc "Creates a test #{scm} repository"
|
desc "Creates a test #{scm} repository"
|
||||||
task scm => :create_dir do
|
task scm => :create_dir do
|
||||||
|
@ -55,11 +55,11 @@ namespace :test do
|
||||||
system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{scm}_repository.tar.gz"
|
system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{scm}_repository.tar.gz"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Creates all test repositories"
|
desc "Creates all test repositories"
|
||||||
task :all => supported_scms
|
task :all => supported_scms
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Updates installed test repositories"
|
desc "Updates installed test repositories"
|
||||||
task :update do
|
task :update do
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
@ -68,19 +68,19 @@ namespace :test do
|
||||||
scm = $1
|
scm = $1
|
||||||
next unless fixture = Dir.glob("test/fixtures/repositories/#{scm}_repository.*").first
|
next unless fixture = Dir.glob("test/fixtures/repositories/#{scm}_repository.*").first
|
||||||
next if File.stat(dir).ctime > File.stat(fixture).mtime
|
next if File.stat(dir).ctime > File.stat(fixture).mtime
|
||||||
|
|
||||||
FileUtils.rm_rf dir
|
FileUtils.rm_rf dir
|
||||||
Rake::Task["test:scm:setup:#{scm}"].execute
|
Rake::Task["test:scm:setup:#{scm}"].execute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Rake::TestTask.new(:units => "db:test:prepare") do |t|
|
Rake::TestTask.new(:units => "db:test:prepare") do |t|
|
||||||
t.libs << "test"
|
t.libs << "test"
|
||||||
t.verbose = true
|
t.verbose = true
|
||||||
t.test_files = FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb']
|
t.test_files = FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb']
|
||||||
end
|
end
|
||||||
Rake::Task['test:scm:units'].comment = "Run the scm unit tests"
|
Rake::Task['test:scm:units'].comment = "Run the scm unit tests"
|
||||||
|
|
||||||
Rake::TestTask.new(:functionals => "db:test:prepare") do |t|
|
Rake::TestTask.new(:functionals => "db:test:prepare") do |t|
|
||||||
t.libs << "test"
|
t.libs << "test"
|
||||||
t.verbose = true
|
t.verbose = true
|
||||||
|
|
Loading…
Reference in New Issue