Sha256: 3dec07c7e33bbdc205d83e063e0d27d03d4e78efea2bd529c463ecb2059c561e
Contents?: true
Size: 1.05 KB
Versions: 21
Compression:
Stored size: 1.05 KB
Contents
#! /usr/bin/env ruby require 'spec_helper' require 'puppet_spec/files' describe Puppet::Settings do include PuppetSpec::Files def minimal_default_settings { :noop => {:default => false, :desc => "noop"} } end it "should be able to make needed directories" do settings = Puppet::Settings.new settings.define_settings :main, minimal_default_settings.update( :maindir => { :default => tmpfile("main"), :type => :directory, :desc => "a", } ) settings.use(:main) File.should be_directory(settings[:maindir]) end it "should make its directories with the correct modes" do settings = Puppet::Settings.new settings.define_settings :main, minimal_default_settings.update( :maindir => { :default => tmpfile("main"), :type => :directory, :desc => "a", :mode => 0750 } ) settings.use(:main) (File.stat(settings[:maindir]).mode & 007777).should == (Puppet.features.microsoft_windows? ? 0755 : 0750) end end
Version data entries
21 entries across 21 versions & 2 rubygems
Version | Path |
---|---|
puppet-3.0.0 | spec/integration/util/settings_spec.rb |