summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-04-27 23:25:59 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-04-27 23:25:59 +0000
commit21eab22997732b98850320906e514b50f6b6fe97 (patch)
treee8cd81f9f0151a13d2521e1265f6e13d84afefe9 /test
parent94bd3b28284f92583d6c49165d0dff1560e888ff (diff)
downloadpuppet-21eab22997732b98850320906e514b50f6b6fe97.tar.gz
puppet-21eab22997732b98850320906e514b50f6b6fe97.tar.xz
puppet-21eab22997732b98850320906e514b50f6b6fe97.zip
Okay, one last try -- the Util#binary command was not returning a path in all true cases, and the provider tests were poorly written and missed it.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2427 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/ral/manager/provider.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ral/manager/provider.rb b/test/ral/manager/provider.rb
index cafb84deb..0394634af 100755
--- a/test/ral/manager/provider.rb
+++ b/test/ral/manager/provider.rb
@@ -56,7 +56,7 @@ class TestTypeProviders < Test::Unit::TestCase
cleanup { Puppet::Type.rmtype(:commands) }
echo = %x{which echo}.chomp
- {:echo => echo, :echo => "echo", :missing => "nosuchcommand", :missing => "/path/to/nosuchcommand"}.each do |name, command|
+ {:echo_plain => "echo", :echo_with_path => echo, :missing_unqualified => "nosuchcommand", :missing_qualified => "/path/to/nosuchcommand"}.each do |name, command|
# Define a provider with mandatory commands
provider = type.provide(:testing) {}
@@ -64,12 +64,12 @@ class TestTypeProviders < Test::Unit::TestCase
provider.commands(name => command)
end
- case name
- when :echo:
- assert_equal(echo, provider.command(:echo), "Did not get correct path for echo")
+ case name.to_s
+ when /echo/
+ assert_equal(echo, provider.command(name), "Did not get correct path for echo")
assert(provider.suitable?, "Provider was not considered suitable with 'echo'")
- when :missing:
- assert_nil(provider.command(:missing), "Somehow got a response for missing commands")
+ when /missing/
+ assert_nil(provider.command(name), "Somehow got a response for missing commands")
assert(! provider.suitable?, "Provider was considered suitable with missing command")
else
raise "Invalid name %s" % name