From 28cf6bf29b4d0e88f8fcd2ded52d9bca03149df9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 19 Oct 2012 11:26:58 -0500 Subject: add test for loading just the syntax on its own --- t/lib/Test/Handlebars.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't/lib/Test/Handlebars.pm') 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; -- cgit v1.2.3