each test file that clones a repo gets its own repo path

This commit is contained in:
rick
2010-12-21 10:37:04 -08:00
parent 58a680ab6d
commit 491eee7ebd
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -22,11 +22,12 @@ def testpath(path)
end
def cloned_testpath(path)
path = testpath(path)
cloned = path.chomp('.git')
FileUtils.rm_rf cloned
Dir.chdir(File.expand_path(File.dirname(path))) do
%x{git clone #{File.basename(path)}}
repo = File.expand_path(testpath(path))
path = File.dirname(repo)
cloned = File.join(path, self.class.name)
FileUtils.rm_rf(cloned)
Dir.chdir(path) do
%x{git clone #{File.basename(repo)} #{self.class.name}}
end
cloned
end