diff options
author | John Iacona <jiacona@genarts.com> | 2013-08-28 14:32:05 -0400 |
---|---|---|
committer | John Iacona <jiacona@genarts.com> | 2013-08-28 14:32:05 -0400 |
commit | 411111b5ff88b682d7e9cc54a47573bccc3e3edc (patch) | |
tree | edbdc8d0945f02d0104d5a758f86c6efc5ef307a /spec/unit | |
parent | a4ee585cb17751dca8cf49d9361124e438a39d87 (diff) | |
download | puppet-vcsrepo-411111b5ff88b682d7e9cc54a47573bccc3e3edc.tar.gz puppet-vcsrepo-411111b5ff88b682d7e9cc54a47573bccc3e3edc.tar.bz2 |
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.rb | 6 |
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 |