summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorAaron Stone <aaron@serendipity.cx>2013-09-04 11:15:02 -0700
committerAaron Stone <aaron@serendipity.cx>2013-09-04 11:15:02 -0700
commit0eeb6501b1b2ea84c38b0d4464ac42c12c4e9fa7 (patch)
treec26854c256da1f671dae965bb37600ac1c605aed /spec/unit
parentf49f3fe075c1b0fbb905f09066ae17cebc51cc83 (diff)
parente69c6eac89fbbbd5c459388eef30b1320ab9d826 (diff)
Merge pull request #91 from jiacona/master
update git provider to handle checking out into an existing (empty) dir
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 68b6c0a..1a6d008 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -74,9 +74,10 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
- context "when the path is not a repository" do
+ context "when the path is not empty and not a repository" do
it "should raise an exception" do
provider.expects(:path_exists?).returns(true)
+ provider.expects(:path_empty?).returns(false)
proc { provider.create }.should raise_error(Puppet::Error)
end
end
@@ -102,9 +103,10 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
- context "when the path is not a repository" do
+ context "when the path is not empty and not a repository" do
it "should raise an exception" do
expects_directory?(true)
+ provider.expects(:path_empty?).returns(false)
proc { provider.create }.should raise_error(Puppet::Error)
end
end