diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-02-12 15:18:38 -0800 |
|---|---|---|
| committer | Daniel Pittman <daniel@rimspace.net> | 2011-02-12 15:18:38 -0800 |
| commit | d9b168b00a7c86489d8b1cf7c28d4e37205710f7 (patch) | |
| tree | 0db63436811744715d6b776f72b72155bef0807b /spec/unit/parser | |
| parent | e512e3effa134271564177e095c6afc19bebe62f (diff) | |
| parent | 414e3a5989c4c1010af0c5d3f61af2608d91d9b8 (diff) | |
| download | puppet-d9b168b00a7c86489d8b1cf7c28d4e37205710f7.tar.gz puppet-d9b168b00a7c86489d8b1cf7c28d4e37205710f7.tar.xz puppet-d9b168b00a7c86489d8b1cf7c28d4e37205710f7.zip | |
Merge branch 'masterzen/tickets/2.6.x/5516' into bug/2.6.next/5516-hashes-can't-be-used-in-selectors
Diffstat (limited to 'spec/unit/parser')
| -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) } |
