diff options
author | Stig Sandbeck Mathisen <ssm@debian.org> | 2014-09-07 10:14:36 +0200 |
---|---|---|
committer | Stig Sandbeck Mathisen <ssm@debian.org> | 2014-09-07 10:14:36 +0200 |
commit | d4b83be375ac1dead058e091191ee7c7b7c24c8a (patch) | |
tree | dc825687392ae3068de5b764be60c53122d9e02a /spec/integration/defaults_spec.rb | |
parent | 229cbb976fe0f70f5f30548b83517b415840f9bb (diff) | |
parent | 1681684857c6e39d60d87b0b3520d8783977ceff (diff) | |
download | puppet-upstream/3.7.0.tar.gz |
Imported Upstream version 3.7.0upstream/3.7.0
Diffstat (limited to 'spec/integration/defaults_spec.rb')
-rwxr-xr-x | spec/integration/defaults_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/integration/defaults_spec.rb b/spec/integration/defaults_spec.rb index 8c8432b6f..734785230 100755 --- a/spec/integration/defaults_spec.rb +++ b/spec/integration/defaults_spec.rb @@ -5,6 +5,32 @@ require 'puppet/defaults' require 'puppet/rails' describe "Puppet defaults" do + + describe "when default_manifest is set" do + it "returns ./manifests by default" do + expect(Puppet[:default_manifest]).to eq('./manifests') + end + + it "errors when $environment is part of the value" do + expect { + Puppet[:default_manifest] = '/$environment/manifest.pp' + }.to raise_error Puppet::Settings::ValidationError, /cannot interpolate.*\$environment/ + end + end + + describe "when disable_per_environment_manifest is set" do + it "returns false by default" do + expect(Puppet[:disable_per_environment_manifest]).to eq(false) + end + + it "errors when set to true and default_manifest is not an absolute path" do + expect { + Puppet[:default_manifest] = './some/relative/manifest.pp' + Puppet[:disable_per_environment_manifest] = true + }.to raise_error Puppet::Settings::ValidationError, /'default_manifest' setting must be.*absolute/ + end + end + describe "when setting the :factpath" do it "should add the :factpath to Facter's search paths" do Facter.expects(:search).with("/my/fact/path") |