summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2013-12-02 11:38:56 -0500
committerMike Gerwitz <gerwitzm@lovullo.com>2013-12-02 12:24:04 -0500
commit8837be29ff114228f86d67c59337119120690e44 (patch)
tree624591a7ef2f67b2bee80b05e2357da18fc257c0 /spec/unit/puppet/provider/vcsrepo
parent4689c514a12764933a9cb1e2858343f0ba5923b3 (diff)
downloadpuppet-vcsrepo-8837be29ff114228f86d67c59337119120690e44.tar.gz
puppet-vcsrepo-8837be29ff114228f86d67c59337119120690e44.tar.bz2
Using rev-parse to determine branch name of HEAD for on_branch? method
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