diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-09-09 16:29:26 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2010-09-09 16:29:26 -0700 |
| commit | 1d93c4dd86181eb2663dd8df2e84719c2e1ffcdf (patch) | |
| tree | fc0e6feee2558d0a59e70c3f7e3b16dee72f0235 /spec/unit/parser/ast | |
| parent | 6860594c4d95855d5106fbf664a473e1ac4d3935 (diff) | |
| parent | ce9bf1edcaac4901de6e0a7da413d1742d216eb0 (diff) | |
| download | puppet-1d93c4dd86181eb2663dd8df2e84719c2e1ffcdf.tar.gz puppet-1d93c4dd86181eb2663dd8df2e84719c2e1ffcdf.tar.xz puppet-1d93c4dd86181eb2663dd8df2e84719c2e1ffcdf.zip | |
Merge remote branch 'paul/ticket/next/4685' into next
Conflicts resolved manually, by Paul Berry:
lib/puppet/parser/ast/astarray.rb
lib/puppet/parser/grammar.ra
lib/puppet/parser/parser.rb (by rebuilding from grammar.ra)
Diffstat (limited to 'spec/unit/parser/ast')
| -rw-r--r-- | spec/unit/parser/ast/definition_spec.rb | 5 | ||||
| -rw-r--r-- | spec/unit/parser/ast/node_spec.rb | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/spec/unit/parser/ast/definition_spec.rb b/spec/unit/parser/ast/definition_spec.rb index 01ca068ad..b7b2c851c 100644 --- a/spec/unit/parser/ast/definition_spec.rb +++ b/spec/unit/parser/ast/definition_spec.rb @@ -3,6 +3,11 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe Puppet::Parser::AST::Definition do + it "should make its context available through an accessor" do + definition = Puppet::Parser::AST::Definition.new('foo', :line => 5) + definition.context.should == {:line => 5} + end + describe "when instantiated" do it "should create a definition with the proper type, name, context, and module name" do definition = Puppet::Parser::AST::Definition.new('foo', :line => 5) diff --git a/spec/unit/parser/ast/node_spec.rb b/spec/unit/parser/ast/node_spec.rb index 409e877f9..3e8017de0 100644 --- a/spec/unit/parser/ast/node_spec.rb +++ b/spec/unit/parser/ast/node_spec.rb @@ -4,9 +4,10 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe Puppet::Parser::AST::Node do describe "when instantiated" do - it "should make its names available through an accessor" do - node = Puppet::Parser::AST::Node.new(['foo', 'bar']) + it "should make its names and context available through accessors" do + node = Puppet::Parser::AST::Node.new(['foo', 'bar'], :line => 5) node.names.should == ['foo', 'bar'] + node.context.should == {:line => 5} end it "should create a node with the proper type, name, context, and module name" do |
