diff options
author | Shawn M Moore <code@sartak.org> | 2012-12-07 14:45:08 -0500 |
---|---|---|
committer | Shawn M Moore <code@sartak.org> | 2012-12-07 14:45:08 -0500 |
commit | a43eefc87bf7aa895c9316568dca748231848462 (patch) | |
tree | 7a164882e16e34d4a74a845530bca694fa4b65d5 /t | |
parent | 12631bd7e7c151640b7695768455ee98dab942b6 (diff) | |
download | text-handlebars-a43eefc87bf7aa895c9316568dca748231848462.tar.gz text-handlebars-a43eefc87bf7aa895c9316568dca748231848462.zip |
Add failing test for {{#each}} with {{../foo}}
Diffstat (limited to 't')
-rw-r--r-- | t/block-helper-builtins.t | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/block-helper-builtins.t b/t/block-helper-builtins.t index c891b89..dac692e 100644 --- a/t/block-helper-builtins.t +++ b/t/block-helper-builtins.t @@ -196,4 +196,32 @@ RENDERED "unless helper (true)" ); +{ local $TODO = "unimplemented"; local $SIG{__WARN__} = sub { }; +render_ok( + <<'TEMPLATE', +<ul class="people_list"> + {{#each people}} + <li>{{../description}} {{this}}</li> + {{/each}} +</ul> +TEMPLATE + { + description => "The Wonderful", + people => [ + "Yehuda Katz", + "Alan Johnson", + "Charles Jolley", + ], + }, + <<'RENDERED', +<ul class="people_list"> + <li>The Wonderful Yehuda Katz</li> + <li>The Wonderful Alan Johnson</li> + <li>The Wonderful Charles Jolley</li> +</ul> +RENDERED + "each helper with ../" +); +} + done_testing; |