summaryrefslogtreecommitdiffstats
path: root/spec/unit/node.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-10-09 15:51:05 +0200
committerLuke Kanies <luke@madstop.com>2008-10-09 15:51:05 +0200
commit9ef6209b3ed1269f7cd1e6a8d0f189f6b5712800 (patch)
tree3c786b42679f3bea18979aceb8e3bf2a5184f366 /spec/unit/node.rb
parentb96bdc6a63f7be6b724c2aa7ad0ea007cba81718 (diff)
parent0fff7d76e89a650f5d2e78b2c69b30635880c36b (diff)
downloadpuppet-9ef6209b3ed1269f7cd1e6a8d0f189f6b5712800.tar.gz
puppet-9ef6209b3ed1269f7cd1e6a8d0f189f6b5712800.tar.xz
puppet-9ef6209b3ed1269f7cd1e6a8d0f189f6b5712800.zip
Merge branch '0.24.x' of git://github.com/jamtur01/puppet into 0.24.x
Diffstat (limited to 'spec/unit/node.rb')
-rwxr-xr-xspec/unit/node.rb19
1 files changed, 2 insertions, 17 deletions
diff --git a/spec/unit/node.rb b/spec/unit/node.rb
index c6d2e61bf..a72c117ff 100755
--- a/spec/unit/node.rb
+++ b/spec/unit/node.rb
@@ -45,20 +45,15 @@ describe Puppet::Node, "when initializing" do
end
it "should accept an environment value" do
- Puppet.settings.stubs(:value).with(:environments).returns("myenv")
+ Puppet.settings.stubs(:value).with(:environment).returns("myenv")
@node = Puppet::Node.new("testing", :environment => "myenv")
@node.environment.should == "myenv"
end
-
- it "should validate the environment" do
- Puppet.settings.stubs(:value).with(:environments).returns("myenv")
- proc { Puppet::Node.new("testing", :environment => "other") }.should raise_error(ArgumentError)
- end
end
describe Puppet::Node, "when returning the environment" do
before do
- Puppet.settings.stubs(:value).with(:environments).returns("one,two")
+ Puppet.settings.stubs(:value).with(:environment).returns("one,two")
Puppet.settings.stubs(:value).with(:environment).returns("one")
@node = Puppet::Node.new("testnode")
end
@@ -73,16 +68,6 @@ describe Puppet::Node, "when returning the environment" do
Puppet::Node::Environment.expects(:new).returns(env)
@node.environment.should == "myenv"
end
-
- it "should fail if the parameter environment is invalid" do
- @node.parameters = {"environment" => "three"}
- proc { @node.environment }.should raise_error(ArgumentError)
- end
-
- it "should fail if the parameter environment is invalid" do
- @node.parameters = {"environment" => "three"}
- proc { @node.environment }.should raise_error(ArgumentError)
- end
end
describe Puppet::Node, "when merging facts" do