#!/usr/bin/env perl use strict; use warnings; use lib 't/lib'; use Test::More; use Test::Handlebars; { local $TODO = "unimplemented"; local $SIG{__WARN__} = sub { }; render_ok( { helpers => { noop => sub { my ($context, $options) = @_; return $options->{fn}->($context); }, }, }, '

{{title}}

{{#noop}}{{body}}{{/noop}}

', { title => 'A', body => 'the first letter' }, '

A

the first letter

', "noop helper" ); render_ok( { helpers => { list => sub { my ($items, $options) = @_; my $out = ""; }, }, }, '{{#list people}}{{firstName}} {{lastName}}{{/list}}', { people => [ { firstName => 'Jesse', lastName => 'Luehrs' }, { firstName => 'Shawn', lastName => 'Moore' }, { firstName => 'Stevan', lastName => 'Little' }, ] }, '', "helpers with arguments" ); } done_testing;