From 9c867e6d79dcc56cd34683c9a339dc729ad2d291 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Sat, 30 Jan 2010 23:36:32 -0600 Subject: Fixing most of the broken tests in test/ This involves a bit of refactoring in the rest of the code to make it all work, but most of the changes are fixing or removing old tests. Signed-off-by: Luke Kanies --- lib/puppet/parser/collector.rb | 6 ++---- lib/puppet/parser/resource.rb | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/collector.rb b/lib/puppet/parser/collector.rb index 044518793..67bd336bb 100644 --- a/lib/puppet/parser/collector.rb +++ b/lib/puppet/parser/collector.rb @@ -41,9 +41,7 @@ class Puppet::Parser::Collector # overrided those resources objects.each do |res| unless @collected.include?(res.ref) - res = Puppet::Parser::Resource.new( - :type => res.type, - :title => res.title, + newres = Puppet::Parser::Resource.new(res.type, res.title, :params => overrides[:params], :file => overrides[:file], :line => overrides[:line], @@ -51,7 +49,7 @@ class Puppet::Parser::Collector :scope => overrides[:scope] ) - scope.compiler.add_override(res) + scope.compiler.add_override(newres) end end end diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index 36f1fbe93..3f6d73df3 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -108,7 +108,9 @@ class Puppet::Parser::Resource < Puppet::Resource end def initialize(type, title, options) - self.type = type + @scope = options[:scope] + + self.relative_type = type self.title = title @params = {} -- cgit