diff options
Diffstat (limited to 'spec/unit/node.rb')
-rwxr-xr-x | spec/unit/node.rb | 19 |
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 |