From: Aaron Stone Date: Mon, 15 Jul 2013 03:00:55 +0000 (-0700) Subject: Fix git tests broken by dcd0d14 X-Git-Url: https://leap.se/git/puppet_vcsrepo.git/commitdiff_plain/aa24b2d25da89f4598dcdfc0e45bcdcb204c9ab3 Fix git tests broken by dcd0d14 --- 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))