summaryrefslogtreecommitdiffstats
path: root/tests/test_helper.rb
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-10 12:43:33 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-10 12:43:33 -0800
commitfde3263abc5c7866aa7dce7aef28eacaa33d7664 (patch)
treec9911ac92e9770c7bfea3e79269f8e7dcf7f6982 /tests/test_helper.rb
parent9d59d2965184964ab6662282ef5f9ceac2c58552 (diff)
downloadthird_party-ruby-git-fde3263abc5c7866aa7dce7aef28eacaa33d7664.tar.gz
third_party-ruby-git-fde3263abc5c7866aa7dce7aef28eacaa33d7664.tar.xz
third_party-ruby-git-fde3263abc5c7866aa7dce7aef28eacaa33d7664.zip
few hours work - diff is done
Diffstat (limited to 'tests/test_helper.rb')
-rw-r--r--tests/test_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_helper.rb b/tests/test_helper.rb
index fe8c34d..03b5f8a 100644
--- a/tests/test_helper.rb
+++ b/tests/test_helper.rb
@@ -19,14 +19,14 @@ class Test::Unit::TestCase
@index = File.join(@test_dir, 'index')
end
- def in_temp_dir
+ def in_temp_dir(remove_after = true)
filename = 'git_test' + Time.now.to_i.to_s + rand(300).to_s
tmp_path = File.join("/tmp/", filename)
FileUtils.mkdir(tmp_path)
Dir.chdir tmp_path do
yield tmp_path
end
- FileUtils.rm_r(tmp_path)
+ FileUtils.rm_r(tmp_path) if remove_after
end
end \ No newline at end of file