summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Stone <aaron@serendipity.cx>2013-07-14 20:00:55 -0700
committerAaron Stone <aaron@serendipity.cx>2013-07-14 20:00:55 -0700
commitaa24b2d25da89f4598dcdfc0e45bcdcb204c9ab3 (patch)
tree5762907a5e6d2e32a337907d27ee28be05bcad7a
parent3fa66eb472dd045bf2f2f2e0484c9cefa288b33b (diff)
downloadpuppet-vcsrepo-aa24b2d25da89f4598dcdfc0e45bcdcb204c9ab3.tar.gz
puppet-vcsrepo-aa24b2d25da89f4598dcdfc0e45bcdcb204c9ab3.tar.bz2
Fix git tests broken by dcd0d14
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 4e4d9f3..cb6c0c6 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -8,6 +8,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
context "with a revision that is a remote branch", :resource => {:revision => 'only/remote'} do
it "should execute 'git clone' and 'git checkout -b'" do
provider.expects(:git).with('clone', resource.value(:source), resource.value(:path))
+ expects_chdir('/')
expects_chdir
provider.expects(:update_submodules)
provider.expects(:git).with('branch', '-a').returns(resource.value(:revision))
@@ -18,6 +19,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
context "with a revision that is not a remote branch", :resource => {:revision => 'a-commit-or-tag'} do
it "should execute 'git clone' and 'git reset --hard'" do
provider.expects(:git).with('clone', resource.value(:source), resource.value(:path))
+ expects_chdir('/')
expects_chdir
provider.expects(:update_submodules)
provider.expects(:git).with('branch', '-a').returns(resource.value(:revision))