diff options
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/testing.rake | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/tasks/testing.rake b/lib/tasks/testing.rake index d987a4882..9eb7ff76a 100644 --- a/lib/tasks/testing.rake +++ b/lib/tasks/testing.rake @@ -51,13 +51,17 @@ namespace :test do end end + def extract_tar_gz(prefix) + unless File.exists?("tmp/test/#{prefix}_repository") + # system "gunzip < test/fixtures/repositories/#{prefix}_repository.tar.gz | tar -xv -C tmp/test" + system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{prefix}_repository.tar.gz" + end + end + (supported_scms - [:subversion, :mercurial]).each do |scm| desc "Creates a test #{scm} repository" task scm => :create_dir do - unless File.exists?("tmp/test/#{scm}_repository") - # system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test" - system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{scm}_repository.tar.gz" - end + extract_tar_gz(scm) end end |