diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-02-12 15:25:17 -0800 |
|---|---|---|
| committer | Daniel Pittman <daniel@rimspace.net> | 2011-02-12 15:25:17 -0800 |
| commit | 98f79dc2e44502bf781dbce180762b892859d4e1 (patch) | |
| tree | 5571b1cf7015bc6b18fcb756225e4f52b1926c43 /spec/unit/parser/parser_spec.rb | |
| parent | e512e3effa134271564177e095c6afc19bebe62f (diff) | |
| parent | 5c26f6828e0e2c1370966472d4d62b2e001c9f0b (diff) | |
| download | puppet-98f79dc2e44502bf781dbce180762b892859d4e1.tar.gz puppet-98f79dc2e44502bf781dbce180762b892859d4e1.tar.xz puppet-98f79dc2e44502bf781dbce180762b892859d4e1.zip | |
Merge branch 'bug/2.6.next/5516-hashes-can't-be-used-in-selectors' into 2.6.next
Diffstat (limited to 'spec/unit/parser/parser_spec.rb')
| -rwxr-xr-x | spec/unit/parser/parser_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/parser/parser_spec.rb b/spec/unit/parser/parser_spec.rb index 2f5d4b8ea..6cc393d91 100755 --- a/spec/unit/parser/parser_spec.rb +++ b/spec/unit/parser/parser_spec.rb @@ -76,6 +76,12 @@ describe Puppet::Parser do end + describe "when parsing selector" do + it "should support hash access on the left hand side" do + lambda { @parser.parse("$h = { 'a' => 'b' } $a = $h['a'] ? { 'b' => 'd', default => undef }") }.should_not raise_error + end + end + describe "when parsing 'if'" do it "not, it should create the correct ast objects" do ast::Not.expects(:new).with { |h| h[:value].is_a?(ast::Boolean) } |
