summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-11 18:08:15 -0600
committerLuke Kanies <luke@madstop.com>2008-02-11 18:08:15 -0600
commitd21416b534eaa5717eca850cfe848716a9b1dc09 (patch)
treedeba9647562710b69e63ec8096c4beca7cbe06fc /spec/unit/node
parentfd0c5cbddec8dc53196a3b84e33e1000c3c0720f (diff)
downloadpuppet-d21416b534eaa5717eca850cfe848716a9b1dc09.tar.gz
puppet-d21416b534eaa5717eca850cfe848716a9b1dc09.tar.xz
puppet-d21416b534eaa5717eca850cfe848716a9b1dc09.zip
Switching the Node Catalog to using a separate method
for validating that a given resource is unique within the catalog. This no longer allows any duplication, even with Execs.
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/catalog.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb
index 93bbd0ad2..a0e201ca9 100755
--- a/spec/unit/node/catalog.rb
+++ b/spec/unit/node/catalog.rb
@@ -365,6 +365,12 @@ describe Puppet::Node::Catalog, " when functioning as a resource container" do
it "should not allow two resources with the same resource reference" do
@catalog.add_resource(@one)
+
+ # These are used to build the failure
+ @dupe.stubs(:file)
+ @dupe.stubs(:line)
+ @one.stubs(:file)
+ @one.stubs(:line)
proc { @catalog.add_resource(@dupe) }.should raise_error(ArgumentError)
end