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
|
||||
FileUtils.mkdir_p Rails.root + '/tmp/test'
|
||||
end
|
||||
|
||||
|
||||
supported_scms = [:subversion, :cvs, :bazaar, :mercurial, :git, :darcs, :filesystem]
|
||||
|
||||
|
||||
desc "Creates a test subversion repository"
|
||||
task :subversion => :create_dir do
|
||||
repo_path = "tmp/test/subversion_repository"
|
||||
system "svnadmin create #{repo_path}"
|
||||
system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}"
|
||||
end
|
||||
|
||||
|
||||
desc "Creates a test mercurial repository"
|
||||
task :mercurial => :create_dir do
|
||||
repo_path = "tmp/test/mercurial_repository"
|
||||
|
@ -47,7 +47,7 @@ namespace :test do
|
|||
system "hg init #{repo_path}"
|
||||
system "hg -R #{repo_path} pull #{bundle_path}"
|
||||
end
|
||||
|
||||
|
||||
(supported_scms - [:subversion, :mercurial]).each do |scm|
|
||||
desc "Creates a test #{scm} repository"
|
||||
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"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
desc "Creates all test repositories"
|
||||
task :all => supported_scms
|
||||
end
|
||||
|
||||
|
||||
desc "Updates installed test repositories"
|
||||
task :update do
|
||||
require 'fileutils'
|
||||
|
@ -68,19 +68,19 @@ namespace :test do
|
|||
scm = $1
|
||||
next unless fixture = Dir.glob("test/fixtures/repositories/#{scm}_repository.*").first
|
||||
next if File.stat(dir).ctime > File.stat(fixture).mtime
|
||||
|
||||
|
||||
FileUtils.rm_rf dir
|
||||
Rake::Task["test:scm:setup:#{scm}"].execute
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Rake::TestTask.new(:units => "db:test:prepare") do |t|
|
||||
t.libs << "test"
|
||||
t.verbose = true
|
||||
t.test_files = FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb']
|
||||
end
|
||||
Rake::Task['test:scm:units'].comment = "Run the scm unit tests"
|
||||
|
||||
|
||||
Rake::TestTask.new(:functionals => "db:test:prepare") do |t|
|
||||
t.libs << "test"
|
||||
t.verbose = true
|
||||
|
|
Loading…
Reference in New Issue