tests/test_helper.rb in git-1.0.4 vs tests/test_helper.rb in git-1.0.5
- old
+ new
@@ -1,7 +1,8 @@
require 'test/unit'
require 'fileutils'
+require 'logger'
require File.dirname(__FILE__) + '/../lib/git'
class Test::Unit::TestCase
def set_file_paths
@@ -23,9 +24,19 @@
def teardown
if @tmp_path
#puts "teardown #{@tmp_path}"
FileUtils.rm_r(@tmp_path)
+ 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')
\ No newline at end of file