summaryrefslogtreecommitdiffstats
path: root/tests/test_helper.rb
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-27 08:21:48 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-27 08:21:48 -0800
commit779f21b307e7c119a56700fb14f88ba63a2cccc2 (patch)
treef3f03821dbe66f581ae2707e6e872395adc7afbe /tests/test_helper.rb
parent55c3c134c5c19103ed52fbd615d5af351fa9bb34 (diff)
parent6a9db968e8563bc27b8f56f9d413159a2e14cf67 (diff)
downloadthird_party-ruby-git-779f21b307e7c119a56700fb14f88ba63a2cccc2.tar.gz
third_party-ruby-git-779f21b307e7c119a56700fb14f88ba63a2cccc2.tar.xz
third_party-ruby-git-779f21b307e7c119a56700fb14f88ba63a2cccc2.zip
Merge branches 'master' and 'internals'
Diffstat (limited to 'tests/test_helper.rb')
-rw-r--r--tests/test_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_helper.rb b/tests/test_helper.rb
index 9907ffe..e40174a 100644
--- a/tests/test_helper.rb
+++ b/tests/test_helper.rb
@@ -28,6 +28,16 @@ class Test::Unit::TestCase
end
end
+
+ def with_temp_bare
+ in_temp_dir do |path|
+ g = Git.clone(@wbare, 'new')
+ Dir.chdir('new') do
+ yield g
+ end
+ end
+ end
+
def create_temp_repo(clone_path)
filename = 'git_test' + Time.now.to_i.to_s + rand(300).to_s.rjust(3, '0')
@tmp_path = File.join("/tmp/", filename)