diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-19 10:30:55 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-19 10:30:55 -0600 |
commit | 7b7bfd8a6c2ca33364adb9a09b54ec732f05007e (patch) | |
tree | b65e8a02a3dbcf07eb6accfafa652d0082a5bdf9 | |
parent | 8f82fc42844931efe8df042cf2d40d0d624c2d55 (diff) | |
parent | 8fe892db28206924e6baacbcca2d709dbd80ad49 (diff) | |
download | puppet-7b7bfd8a6c2ca33364adb9a09b54ec732f05007e.tar.gz puppet-7b7bfd8a6c2ca33364adb9a09b54ec732f05007e.tar.xz puppet-7b7bfd8a6c2ca33364adb9a09b54ec732f05007e.zip |
Merge commit 'davids-bugfixes/tests/fix-settings-fail-as-root'
-rwxr-xr-x | spec/unit/util/settings.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb index e647ce1cd..620c04009 100755 --- a/spec/unit/util/settings.rb +++ b/spec/unit/util/settings.rb @@ -392,6 +392,7 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d @settings = Puppet::Util::Settings.new @settings.setdefaults :main, :maindir => ["/maindir", "a"], :seconddir => ["/seconddir", "a"] @settings.setdefaults :other, :otherdir => {:default => "/otherdir", :desc => "a", :owner => "luke", :group => "johnny", :mode => 0755} + @settings.setdefaults :third, :thirddir => ["/thirddir", "b"] @settings.setdefaults :files, :myfile => {:default => "/myfile", :desc => "a", :mode => 0755} end @@ -424,9 +425,9 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d it "should be able to create needed directories in multiple sections" do Dir.expects(:mkdir).with("/maindir") - Dir.expects(:mkdir).with("/otherdir", 0755) Dir.expects(:mkdir).with("/seconddir") - @settings.use(:main, :other) + Dir.expects(:mkdir).with("/thirddir") + @settings.use(:main, :third) end it "should provide a method to trigger enforcing of file modes on existing files and directories" do @@ -540,8 +541,8 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d end it "should support a method for re-using all currently used sections" do - Dir.expects(:mkdir).with(@settings[:otherdir], 0755).times(2) - @settings.use(:other) + Dir.expects(:mkdir).with("/thirddir").times(2) + @settings.use(:third) @settings.reuse end |