summaryrefslogtreecommitdiffstats
path: root/t/lib/Test/Handlebars.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-19 11:26:58 -0500
committerJesse Luehrs <doy@tozt.net>2013-01-02 13:56:21 -0600
commit32ec4a2cda7b608c8da3575318347c140a89c2f9 (patch)
tree801c7c858b198bea0b8d6279e2e23bc0723fcfe6 /t/lib/Test/Handlebars.pm
parentfb6e289d7fe95bf9b7aec9acd9ccfe155274e0da (diff)
downloadtext-handlebars-32ec4a2cda7b608c8da3575318347c140a89c2f9.tar.gz
text-handlebars-32ec4a2cda7b608c8da3575318347c140a89c2f9.zip
add test for loading just the syntax on its own
Diffstat (limited to 't/lib/Test/Handlebars.pm')
-rw-r--r--t/lib/Test/Handlebars.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/lib/Test/Handlebars.pm b/t/lib/Test/Handlebars.pm
index c2d1fa7..9d06d21 100644
--- a/t/lib/Test/Handlebars.pm
+++ b/t/lib/Test/Handlebars.pm
@@ -34,8 +34,11 @@ sub _render_ok {
my ($template, $env, $expected, $desc) = @_;
$opts->{cache} = 0;
+ my $create = delete $opts->{__create} || sub {
+ Text::Handlebars->new(%{ $_[0] });
+ };
- my $tx = Text::Handlebars->new(%$opts);
+ my $tx = $create->($opts);
my $exception = exception {
local $Test::Builder::Level = $Test::Builder::Level + 5;