summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBruce Williams <bruce@codefluency.com>2010-03-15 11:16:22 -0700
committerBruce Williams <bruce@codefluency.com>2010-03-15 11:16:22 -0700
commit4b8e7074e62900ed796cc05bb67a7561f40f899a (patch)
tree2e0e801b21605ca74d18317adff0930088101597 /spec
parent52e078444a12d47530a4299d0e9d60b86066c76e (diff)
ensure = latest to support reference tracking.\n\nWorking with tags, more work needed for branches (at least with git)
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 5cf6c86..0e16e60 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -185,11 +185,20 @@ describe provider_class do
describe "when setting the revision property" do
it "should use 'git fetch' and 'git reset'" do
@resource.expects(:value).with(:path).returns(@path).at_least_once
- @provider.expects('git').with('fetch', 'origin')
+ @provider.expects('git').with('pull', 'origin')
Dir.expects(:chdir).with(@path).at_least_once.yields
@provider.expects('git').with('reset', '--hard', 'carcar')
@provider.revision = 'carcar'
end
end
+ describe "when updating references" do
+ it "should use 'git fetch --tags'" do
+ @resource.expects(:value).with(:path).returns(@path).at_least_once
+ @provider.expects('git').with('fetch', '--tags', 'origin')
+ Dir.expects(:chdir).with(@path).at_least_once.yields
+ @provider.update_references
+ end
+ end
+
end