From fa6494b69ad1b01a9c587c86aa1731f4702f5509 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 13 Feb 2009 00:29:07 -0600 Subject: Using the FileCollection where appropriate. This commit just replaces the :file and :line accessors with the use of the new FileCollection Lookup module. This should mean that we've normalized all file names in a given process, which *might* have drastic RAM improvements. For initial simplicity, I've gone with a single global collection of file names, but it's built so it's easy to use individual file collections instead. Signed-off-by: Luke Kanies --- spec/unit/parser/resource.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/unit/parser/resource.rb') diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb index 63cfbc2ed..2666f6461 100755 --- a/spec/unit/parser/resource.rb +++ b/spec/unit/parser/resource.rb @@ -44,6 +44,10 @@ describe Puppet::Parser::Resource do end end + it "should use the file lookup module" do + Puppet::Parser::Resource.ancestors.should be_include(Puppet::FileCollection::Lookup) + end + it "should be isomorphic if it is builtin and models an isomorphic type" do Puppet::Type.type(:file).expects(:isomorphic?).returns(true) @resource = Puppet::Parser::Resource.new(:type => "file", :title => "whatever", :scope => @scope, :source => @source).isomorphic?.should be_true -- cgit