summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-02-12 15:51:57 -0800
committerDaniel Pittman <daniel@rimspace.net>2011-02-12 15:51:57 -0800
commit9bd15b77d4cc210249228ff628b6e7708124aca3 (patch)
treee13fe264ee0cb2f4e5fdc8dbafae3f3773d17d5e /spec
parent98f79dc2e44502bf781dbce180762b892859d4e1 (diff)
parenta0d320439c72f7b7969cd51b33a8db141eb9a599 (diff)
downloadpuppet-9bd15b77d4cc210249228ff628b6e7708124aca3.tar.gz
puppet-9bd15b77d4cc210249228ff628b6e7708124aca3.tar.xz
puppet-9bd15b77d4cc210249228ff628b6e7708124aca3.zip
Merge branch 'bug/2.6.next/6269-hashes-only-work-with-two-levels' into 2.6.next
Diffstat (limited to 'spec')
-rwxr-xr-xspec/integration/parser/parser_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/integration/parser/parser_spec.rb b/spec/integration/parser/parser_spec.rb
index 7b85bcacb..20d87c228 100755
--- a/spec/integration/parser/parser_spec.rb
+++ b/spec/integration/parser/parser_spec.rb
@@ -109,5 +109,12 @@ describe Puppet::Parser::Parser do
it "should correctly set the arrow type of a relationship" do
"Notify[foo] <~ Notify[bar]".should parse_with { |rel| rel.arrow == "<~" }
end
+
+ it "should be able to parse deep hash access" do
+ %q{
+ $hash = { 'a' => { 'b' => { 'c' => 'it works' } } }
+ $out = $hash['a']['b']['c']
+ }.should parse_with { |v| v.value.is_a?(Puppet::Parser::AST::ASTHash) }
+ end
end
end