summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2013-12-02 09:30:42 -0800
committerAshley Penney <ashley.penney@puppetlabs.com>2013-12-02 09:30:42 -0800
commita96a42e38b6c6d306ef158250658ae5673f383a3 (patch)
tree624591a7ef2f67b2bee80b05e2357da18fc257c0 /spec/unit/puppet/provider/vcsrepo
parentf2f1a82d72ec8afb50c32206abeaa32923ee410b (diff)
parent8837be29ff114228f86d67c59337119120690e44 (diff)
downloadpuppet-vcsrepo-a96a42e38b6c6d306ef158250658ae5673f383a3.tar.gz
puppet-vcsrepo-a96a42e38b6c6d306ef158250658ae5673f383a3.tar.bz2
Merge pull request #106 from mikegerwitz/master
Correctly handle detached head for 'latest' on latest Git versions
Diffstat (limited to 'spec/unit/puppet/provider/vcsrepo')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 15fee53..f3d9dd3 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -323,19 +323,19 @@ describe Puppet::Type.type(:vcsrepo).provider(:git_provider) do
end
context 'on master' do
it do
- provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a))
+ provider.expects(:git).with('rev-parse', '--abbrev-ref', 'HEAD').returns(fixture(:git_branch_a))
provider.latest.should == 'master'
end
end
context 'no branch' do
it do
- provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_none))
+ provider.expects(:git).with('rev-parse', '--abbrev-ref', 'HEAD').returns(fixture(:git_branch_none))
provider.latest.should == 'master'
end
end
context 'feature/bar' do
it do
- provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_feature_bar))
+ provider.expects(:git).with('rev-parse', '--abbrev-ref', 'HEAD').returns(fixture(:git_branch_feature_bar))
provider.latest.should == 'master'
end
end