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>2012-10-19 11:26:58 -0500
commit28cf6bf29b4d0e88f8fcd2ded52d9bca03149df9 (patch)
tree80f0e4445b92455972f05e50d2619c8d894360ce /t/lib/Test/Handlebars.pm
parent481b04ace765135c4b990e90a0b872fa23f286f0 (diff)
downloadtext-handlebars-28cf6bf29b4d0e88f8fcd2ded52d9bca03149df9.tar.gz
text-handlebars-28cf6bf29b4d0e88f8fcd2ded52d9bca03149df9.zip
add test for loading just the syntax on its ownxslate-more-opcodes
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 ececc41..c0f0da3 100644
--- a/t/lib/Test/Handlebars.pm
+++ b/t/lib/Test/Handlebars.pm
@@ -36,8 +36,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;