diff --git a/test/helper.rb b/test/helper.rb index a69fe485..ee413666 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -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 diff --git a/test/test_page_revert.rb b/test/test_page_revert.rb index 9b32401d..9f96852f 100644 --- a/test/test_page_revert.rb +++ b/test/test_page_revert.rb @@ -8,7 +8,7 @@ context "Page Reverting" do end teardown do - FileUtils.rm_rf @path + FileUtils.rm_rf(@path) end test "reverts single commit" do