From 75c6e4aed8bf60fbb1bd535fcdd5504f48ce9dde Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Thu, 6 Aug 2009 22:26:27 -0700 Subject: Fixes #2493 Added downcasing into find_or_load (which replaced fqfind) to get back the old behaviour. Adjusted tests so that they would catch the problem & confirmed that they fail without the downcasing. Added tests to confirm the existance of #2493; improved existing autoload tests (removed inter-test interactions) and noted (with a TODO) that there was dead code in the feature loading test; added analogus case sensitivity tests where apropriate. --- spec/unit/parser/compiler.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec/unit/parser/compiler.rb') diff --git a/spec/unit/parser/compiler.rb b/spec/unit/parser/compiler.rb index 0cc6e8a17..ad6f351bf 100755 --- a/spec/unit/parser/compiler.rb +++ b/spec/unit/parser/compiler.rb @@ -423,6 +423,16 @@ describe Puppet::Parser::Compiler do @compiler.evaluate_classes(%w{myclass}, @scope, false) end + it "should skip classes previously evaluated with different capitalization" do + @compiler.catalog.stubs(:tag) + @scope.stubs(:find_hostclass).with("MyClass").returns(@class) + @compiler.expects(:class_scope).with(@class).returns("something") + @compiler.expects(:add_resource).never + @resource.expects(:evaluate).never + Puppet::Parser::Resource.expects(:new).never + @compiler.evaluate_classes(%w{MyClass}, @scope, false) + end + it "should return the list of found classes" do @compiler.catalog.stubs(:tag) -- cgit