summaryrefslogtreecommitdiffstats
path: root/tests/units/test_init.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/test_init.rb')
-rw-r--r--tests/units/test_init.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/units/test_init.rb b/tests/units/test_init.rb
index f1a8ba4..4681ba0 100644
--- a/tests/units/test_init.rb
+++ b/tests/units/test_init.rb
@@ -21,7 +21,7 @@ class TestInit < Test::Unit::TestCase
end
def test_git_bare
- g = Git.repo @wbare
+ g = Git.bare @wbare
assert_equal(g.repo.path, @wbare)
end
@@ -51,11 +51,19 @@ class TestInit < Test::Unit::TestCase
def test_git_clone
in_temp_dir do |path|
- Git.clone(uri, :repository => dir)
- assert(File.exists?(File.join(dir, 'config')))
+ g = Git.clone(@wbare, 'bare-co')
+ assert(File.exists?(File.join(g.repo.path, 'config')))
end
end
-
+
+ def test_git_clone_bare
+ in_temp_dir do |path|
+ g = Git.clone(@wbare, 'bare.git', :bare => true)
+ assert(File.exists?(File.join(g.repo.path, 'config')))
+ assert_nil(g.dir)
+ end
+ end
+
# trying to open a git project using a bare repo - rather than using Git.repo
def test_git_open_error
assert_raise ArgumentError do