diff options
author | Bruce Williams <bruce@codefluency.com> | 2010-03-15 11:16:22 -0700 |
---|---|---|
committer | Bruce Williams <bruce@codefluency.com> | 2010-03-15 11:16:22 -0700 |
commit | 4b8e7074e62900ed796cc05bb67a7561f40f899a (patch) | |
tree | 2e0e801b21605ca74d18317adff0930088101597 /spec/unit | |
parent | 52e078444a12d47530a4299d0e9d60b86066c76e (diff) | |
download | puppet-vcsrepo-4b8e7074e62900ed796cc05bb67a7561f40f899a.tar.gz puppet-vcsrepo-4b8e7074e62900ed796cc05bb67a7561f40f899a.tar.bz2 |
ensure = latest to support reference tracking.\n\nWorking with tags, more work needed for branches (at least with git)
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/puppet/provider/vcsrepo/git_spec.rb | 11 |
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 |