From d7ea9052f1ecc5add24ad8b9d0cb06082f28c86f Mon Sep 17 00:00:00 2001
From: gitlabhq <m@gitlabhq.com>
Date: Sun, 9 Oct 2011 22:55:06 +0300
Subject: tests seed

---
 db/fixtures/test/001_repo.rb | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

(limited to 'db/fixtures/test')

diff --git a/db/fixtures/test/001_repo.rb b/db/fixtures/test/001_repo.rb
index 034596f1cbf..3eb4c299b4a 100644
--- a/db/fixtures/test/001_repo.rb
+++ b/db/fixtures/test/001_repo.rb
@@ -1,8 +1,11 @@
-# Clone  repo
-`cp spec/seed_project.tar.gz /tmp/`
-Dir.chdir("/tmp")
+# Create dir for test repo
+repo_dir = File.join(Rails.root, "tmp", "tests")
+Dir.mkdir(repo_dir) unless File.exists?(repo_dir)
+
+`cp spec/seed_project.tar.gz tmp/tests/`
+Dir.chdir(repo_dir)
 `tar -xf seed_project.tar.gz`
 3.times do |i|
-`cp -r /tmp/legit/ /tmp/legit_#{i}/`
-puts "Unpacked seed repo - /tmp/legit_#{i}"
+`cp -r legit/ legit_#{i}/`
+puts "Unpacked seed repo - tmp/tests/legit_#{i}"
 end
-- 
cgit v1.2.1