summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider/vcsrepo/git_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/puppet/provider/vcsrepo/git_spec.rb')
-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