diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-19 23:27:07 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-19 23:27:07 -0600 |
commit | 53008e567fd64f391e0b45652b2f4ac1551ccf47 (patch) | |
tree | a67926faf1e9599af2c60fde3c005b2f7118925d /spec/unit | |
parent | 9e5fc76eb77a9b90afb384d34a8e5bf63f79af6e (diff) | |
download | puppet-53008e567fd64f391e0b45652b2f4ac1551ccf47.tar.gz puppet-53008e567fd64f391e0b45652b2f4ac1551ccf47.tar.xz puppet-53008e567fd64f391e0b45652b2f4ac1551ccf47.zip |
The Puppet settings instance now validates environments when
you set an environment.
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/node/environment.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/node/environment.rb b/spec/unit/node/environment.rb index cccff7b97..69d7acb47 100755 --- a/spec/unit/node/environment.rb +++ b/spec/unit/node/environment.rb @@ -29,6 +29,11 @@ describe Puppet::Node::Environment do Puppet::Node::Environment.valid?(:one).should be_true end + it "should be used to determine when an environment setting is valid" do + Puppet.settings.expects(:value).with(:environments).returns("one,two") + proc { Puppet.settings[:environment] = :three }.should raise_error(ArgumentError) + end + it "should use the default environment if no name is provided while initializing an environment" do Puppet.settings.expects(:value).with(:environments).returns("one,two") Puppet.settings.expects(:value).with(:environment).returns("one") |