diff options
author | Luke Kanies <luke@madstop.com> | 2008-03-18 16:35:06 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-03-18 16:35:06 -0500 |
commit | e81fc583f1f25241d91e2402b89a06026138a20c (patch) | |
tree | 4b41df56a26864e9e6963c31e8ae291fedfbc692 /spec/unit | |
parent | fca467da6013dfeb1015a82e178d0db241eaa54e (diff) | |
download | puppet-e81fc583f1f25241d91e2402b89a06026138a20c.tar.gz puppet-e81fc583f1f25241d91e2402b89a06026138a20c.tar.xz puppet-e81fc583f1f25241d91e2402b89a06026138a20c.zip |
Settings now (again?) do not use a section more than
once, which should make the system a bit more efficient.
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/util/settings.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb index 45183e2fa..fbd638663 100755 --- a/spec/unit/util/settings.rb +++ b/spec/unit/util/settings.rb @@ -633,6 +633,19 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d lambda { @settings.use(:mysection) }.should raise_error end + it "should do nothing if all specified sections have already been used" do + bucket = mock 'bucket' + catalog = mock 'catalog' + + @settings.expects(:to_transportable).once.returns(bucket) + bucket.expects(:to_catalog).returns catalog + catalog.stub_everything + + @settings.use(:whatever) + + @settings.use(:whatever) + end + it "should ignore file settings whose values are not strings" do @settings[:maindir] = false |