diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-07-14 15:27:54 -0700 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2011-07-14 15:27:54 -0700 |
| commit | afc3616dc31f4a432410be4081a657726a257986 (patch) | |
| tree | 72587e4fbe49bceff756e9fdb3e718612e4b2a93 /spec/unit/util | |
| parent | acf5d3ae8c45099534d0b4d43276c1ae3d586c8a (diff) | |
| parent | 790e947e5581fc51e7002c81c3848fb7048bb6ac (diff) | |
| download | puppet-afc3616dc31f4a432410be4081a657726a257986.tar.gz puppet-afc3616dc31f4a432410be4081a657726a257986.tar.xz puppet-afc3616dc31f4a432410be4081a657726a257986.zip | |
Merge branch '2.6.x' into 2.7.x
* 2.6.x:
(maint) Cleanup and strengthen acceptance tests
(#7144) Update Settings#writesub to convert mode to Fixnum
(maint) Fix platform dection for RHEL
Manually Resolved Conflicts:
acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb
spec/unit/util/settings_spec.rb
Diffstat (limited to 'spec/unit/util')
| -rwxr-xr-x | spec/unit/util/settings_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/util/settings_spec.rb b/spec/unit/util/settings_spec.rb index aa50c8f3a..a2cd57a0c 100755 --- a/spec/unit/util/settings_spec.rb +++ b/spec/unit/util/settings_spec.rb @@ -1,5 +1,6 @@ #!/usr/bin/env rspec require 'spec_helper' +require 'ostruct' describe Puppet::Util::Settings do describe "when specifying defaults" do @@ -1104,4 +1105,14 @@ describe Puppet::Util::Settings do it "should cache the result" end + + describe "#writesub" do + it "should only pass valid arguments to File.open" do + settings = Puppet::Util::Settings.new + settings.stubs(:get_config_file_default).with(:privatekeydir).returns(OpenStruct.new(:mode => "750")) + + File.expects(:open).with("/path/to/keydir", "w", 750).returns true + settings.writesub(:privatekeydir, "/path/to/keydir") + end + end end |
