diff options
| author | Markus Roberts <Markus@reality.com> | 2010-11-04 13:53:23 -0700 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2010-11-12 15:02:00 +1100 |
| commit | b15231df5842df2ea83b779b22e6756e51bc39d0 (patch) | |
| tree | 34978db4a199ccca92e35c66e154851bc60fff27 /spec/unit/util | |
| parent | ea435a43dc97487d054271a9efb208f361408339 (diff) | |
| download | puppet-b15231df5842df2ea83b779b22e6756e51bc39d0.tar.gz puppet-b15231df5842df2ea83b779b22e6756e51bc39d0.tar.xz puppet-b15231df5842df2ea83b779b22e6756e51bc39d0.zip | |
Fix for #4299 -- Don't require which
We already had an internal implementation of which hiding under an assumed
name (Puppet::Util.binary); this commit calls it out of hiding and uses it
consisantly.
Diffstat (limited to 'spec/unit/util')
| -rw-r--r-- | spec/unit/util/command_line_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/util/command_line_spec.rb b/spec/unit/util/command_line_spec.rb index a83ad968d..7ba965249 100644 --- a/spec/unit/util/command_line_spec.rb +++ b/spec/unit/util/command_line_spec.rb @@ -86,7 +86,7 @@ describe Puppet::Util::CommandLine do describe "when the subcommand is not implemented" do it "should find and invoke an executable with a hyphenated name" do commandline = Puppet::Util::CommandLine.new("puppet", ['whatever', 'argument'], @tty) - Puppet::Util.expects(:binary).with('puppet-whatever').returns('/dev/null/puppet-whatever') + Puppet::Util.expects(:which).with('puppet-whatever').returns('/dev/null/puppet-whatever') commandline.expects(:system).with('/dev/null/puppet-whatever', 'argument') commandline.execute @@ -95,7 +95,7 @@ describe Puppet::Util::CommandLine do describe "and an external implementation cannot be found" do it "should abort and show the usage message" do commandline = Puppet::Util::CommandLine.new("puppet", ['whatever', 'argument'], @tty) - Puppet::Util.expects(:binary).with('puppet-whatever').returns(nil) + Puppet::Util.expects(:which).with('puppet-whatever').returns(nil) commandline.expects(:system).never commandline.expects(:usage_message).returns("the usage message") |
