diff options
| author | Luke Kanies <luke@madstop.com> | 2009-12-01 16:41:38 -0800 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-12-09 02:13:03 +1100 |
| commit | 8971d8beae2c409f9052f27c3f80ad3bdfff4de2 (patch) | |
| tree | c6f7eda0523c31c2b2f3a02b3761bf43ef716ebf /spec/unit/parser/resource | |
| parent | 39d4a935d47f1d42241ce492c48818dc5b533c29 (diff) | |
| download | puppet-8971d8beae2c409f9052f27c3f80ad3bdfff4de2.tar.gz puppet-8971d8beae2c409f9052f27c3f80ad3bdfff4de2.tar.xz puppet-8971d8beae2c409f9052f27c3f80ad3bdfff4de2.zip | |
Fixing #2596 - Node, Class, Definition are not AST
This commit extracts these three classes into a single
ResourceType class in the Parser heirarchy, now completely
independent of the AST heirarchy.
Most of the other changes are just changing the interface
to the new class, which is greatly simplified over the previous
classes.
This opens up the possibility of drastically simplifying a lot
of this other code, too -- in particular, replacing the reference
to the parser with a reference to the (soon to be renamed)
LoadedCode class.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/parser/resource')
| -rwxr-xr-x | spec/unit/parser/resource/reference.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/parser/resource/reference.rb b/spec/unit/parser/resource/reference.rb index 6284e67cc..e082136c5 100755 --- a/spec/unit/parser/resource/reference.rb +++ b/spec/unit/parser/resource/reference.rb @@ -84,7 +84,7 @@ describe Puppet::Parser::Resource::Reference, " when modeling defined types" do scope = @compiler.topscope.class.new(:parent => @compiler.topscope, :namespace => "other", :parser => @parser) ref = @type.new(:type => "class", :title => "top", :scope => scope) - ref.definedtype.classname.should equal(top.classname) + ref.definedtype.name.should equal(top.name) end it "should only look for fully qualified definitions" do @@ -94,6 +94,6 @@ describe Puppet::Parser::Resource::Reference, " when modeling defined types" do scope = @compiler.topscope.class.new(:parent => @compiler.topscope, :namespace => "other", :parser => @parser) ref = @type.new(:type => "top", :title => "foo", :scope => scope) - ref.definedtype.classname.should equal(top.classname) + ref.definedtype.name.should equal(top.name) end end |
