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 /test/other | |
| 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 'test/other')
| -rwxr-xr-x | test/other/provider.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/test/other/provider.rb b/test/other/provider.rb index 052d7a0d0..a539ee5a7 100755 --- a/test/other/provider.rb +++ b/test/other/provider.rb @@ -70,24 +70,13 @@ class TestImpl < Test::Unit::TestCase child = @type.provide("child", :parent => parent.name) {} } - assert_nothing_raised { - child.commands :which => "which" - } - - assert(child.command(:which), "Did not find 'which' command") - - assert(child.command(:which) =~ /^\//, - "Command did not become fully qualified") - assert(FileTest.exists?(child.command(:which)), - "Did not find actual 'which' binary") - assert_raise(Puppet::DevError) do child.command(:nosuchcommand) end # Now create a parent command assert_nothing_raised { - parent.commands :sh => Puppet::Util.binary('sh') + parent.commands :sh => Puppet::Util.which('sh') } assert(parent.command(:sh), "Did not find 'sh' command") |
