summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/ast
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-06-04 00:33:25 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-07-05 18:47:08 +1000
commitcddc365e9bac786c7a64240073b69bc54b6d2f2e (patch)
tree3a68f908af4320e7957a2d27fd24d49565c0000f /spec/unit/parser/ast
parentfc1f8cdbee606da0d2a1a162942295d28cdcbf64 (diff)
downloadpuppet-cddc365e9bac786c7a64240073b69bc54b6d2f2e.tar.gz
puppet-cddc365e9bac786c7a64240073b69bc54b6d2f2e.tar.xz
puppet-cddc365e9bac786c7a64240073b69bc54b6d2f2e.zip
Switching to LoadedCode from ASTSet
I also took the opportunity to clean up and simplify the interface to the parts of the parser that interact with this. Mostly it was method renames. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/parser/ast')
-rwxr-xr-xspec/unit/parser/ast/resource_reference.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/parser/ast/resource_reference.rb b/spec/unit/parser/ast/resource_reference.rb
index c7b6e8780..3a759c550 100755
--- a/spec/unit/parser/ast/resource_reference.rb
+++ b/spec/unit/parser/ast/resource_reference.rb
@@ -22,22 +22,22 @@ describe Puppet::Parser::AST::ResourceReference do
%{ "one::two" "one-two"}.each do |type|
it "should evaluate correctly reference to define" do
klass = stub 'klass', :title => "three", :classname => type
- @scope.stubs(:finddefine).returns(klass)
-
+ @scope.stubs(:find_definition).returns(klass)
+
newref("three", type).evaluate(@scope).to_ref.should == Puppet::Parser::Resource::Reference.new( :type => type, :title => "three" ).to_ref
end
end
it "should be able to call qualified_class" do
klass = stub 'klass', :title => "three", :classname => "one"
- @scope.expects(:findclass).with("one").returns(klass)
- newref("three","class").qualified_class(@scope,"one").should == "one"
+ @scope.expects(:find_hostclass).with("one").returns(klass)
+ newref("three","class").qualified_class(@scope,"one").should == "one"
end
it "should be able to find qualified classes when evaluating" do
klass = stub 'klass', :title => "one", :classname => "one"
- @scope.stubs(:findclass).returns(klass)
-
+ @scope.stubs(:find_hostclass).returns(klass)
+
evaled = newref("one", "class").evaluate(@scope)
evaled.type.should == "Class"
evaled.title.should == "one"