diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-23 19:33:35 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-23 19:33:35 -0600 |
commit | 1486d3969c1f4ebf63c4d1c3ddb6c07f70c048b9 (patch) | |
tree | d6253f66724eb0584769b86a49dcd15e7cf8af20 /spec/unit | |
parent | 03c8ffd76cc8f1f1e59527718f1a7235992866b7 (diff) | |
download | puppet-1486d3969c1f4ebf63c4d1c3ddb6c07f70c048b9.tar.gz puppet-1486d3969c1f4ebf63c4d1c3ddb6c07f70c048b9.tar.xz puppet-1486d3969c1f4ebf63c4d1c3ddb6c07f70c048b9.zip |
Applying patch 20070913004017-6856b-cdbbba99de0b33b64874205a27833b5114fcc6b9.patch by womble -- Allow empty config settings
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/util/settings.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb index 620c04009..2856c574e 100755 --- a/spec/unit/util/settings.rb +++ b/spec/unit/util/settings.rb @@ -323,6 +323,17 @@ describe Puppet::Util::Settings, " when parsing its configuration" do @settings[:myfile].should == "/other/file" @settings.metadata(:myfile).should == {:owner => "luke"} end + + it "should allow empty values" do + @settings.setdefaults :section, :myarg => ["myfile", "a"] + + text = "[main] + myarg = + " + @settings.stubs(:read_file).returns(text) + @settings.parse("/some/file") + @settings[:myarg].should == "" + end end describe Puppet::Util::Settings, " when reparsing its configuration" do |