summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/resource.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-29 12:04:42 -0600
committerLuke Kanies <luke@madstop.com>2008-02-29 12:04:42 -0600
commit65b72676aef2d58314f546eb31780d1b9925b9b3 (patch)
tree6d09647c1b566063e660e639e4c401b39137ceff /spec/unit/parser/resource.rb
parent4c3fa7806d12f86fce01030aa5e3745e698cb3c0 (diff)
downloadpuppet-65b72676aef2d58314f546eb31780d1b9925b9b3.tar.gz
puppet-65b72676aef2d58314f546eb31780d1b9925b9b3.tar.xz
puppet-65b72676aef2d58314f546eb31780d1b9925b9b3.zip
Fixing the fact that resources that model defined resources
were getting finished multiple times, which meant they got multiple copies of metaparams.
Diffstat (limited to 'spec/unit/parser/resource.rb')
-rwxr-xr-xspec/unit/parser/resource.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb
index 035590341..9ce7b391b 100755
--- a/spec/unit/parser/resource.rb
+++ b/spec/unit/parser/resource.rb
@@ -67,6 +67,12 @@ describe Puppet::Parser::Resource do
@resource = Puppet::Parser::Resource.new(:type => "mydefine", :title => "whatever", :scope => @scope, :source => @source)
end
+ it "should do nothing if it has already been finished" do
+ @resource.finish
+ @resource.expects(:add_metaparams).never
+ @resource.finish
+ end
+
it "should copy metaparams from its scope" do
@scope.setvar("noop", "true")