From c2b9ded442bbcd216c166b2761c32c675ce6f395 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 5 Oct 2012 12:47:06 -0500 Subject: test for passing context to partials --- t/partials.t | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 t/partials.t diff --git a/t/partials.t b/t/partials.t new file mode 100644 index 0000000..8238d77 --- /dev/null +++ b/t/partials.t @@ -0,0 +1,25 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use lib 't/lib'; +use Test::More; +use Test::Handlebars; + +{ local $TODO = "unimplemented"; +render_ok( + { + path => [ { dude => '{{#this}}{{name}} ({{url}}) {{/this}}' } ], + }, + 'Dudes: {{>dude dudes}}', + { + dudes => [ + { name => "Yehuda", url => "http://yehuda" }, + { name => "Alan", url => "http://alan" }, + ], + }, + 'Dudes: Yehuda (http://yehuda) Alan (http://alan) ', + "passing a context to partials" +); +} + +done_testing; -- cgit v1.2.3