diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-05-12 18:32:39 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 342298c4f9fcb2874d4017219a472ddf37dbfc6b (patch) | |
| tree | 88ce4cf98d858a595498825a60316c8de1178f87 /spec | |
| parent | 6d5566a715c0b757480b1d321d5801b795470552 (diff) | |
| download | puppet-342298c4f9fcb2874d4017219a472ddf37dbfc6b.tar.gz puppet-342298c4f9fcb2874d4017219a472ddf37dbfc6b.tar.xz puppet-342298c4f9fcb2874d4017219a472ddf37dbfc6b.zip | |
Bug: Broken codepath in util/settings
An incorrect variable name is used in an error message, causing the
error to throw an error.
This can't appear in the wild, since it's actually just an argument
check for the defaults.rb file.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/util/settings.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb index 3eba6dd14..afdcf626a 100755 --- a/spec/unit/util/settings.rb +++ b/spec/unit/util/settings.rb @@ -38,6 +38,10 @@ describe Puppet::Util::Settings do lambda { @settings.setdefaults(:section, :myvalue => {:default => "a value"}) }.should raise_error(ArgumentError) end + it "should raise an error if we can't guess the type" do + lambda { @settings.setdefaults(:section, :myvalue => {:default => Object.new, :desc => "An impossible object"}) }.should raise_error(ArgumentError) + end + it "should support specifying owner, group, and mode when specifying files" do @settings.setdefaults(:section, :myvalue => {:default => "/some/file", :owner => "service", :mode => "boo", :group => "service", :desc => "whatever"}) end |
