summaryrefslogtreecommitdiffstats
path: root/t/mustache-spec.t
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/mustache-spec.t
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/mustache-spec.t')
-rw-r--r--t/mustache-spec.t17
1 files changed, 8 insertions, 9 deletions
diff --git a/t/mustache-spec.t b/t/mustache-spec.t
index ae69af5..abf51b7 100644
--- a/t/mustache-spec.t
+++ b/t/mustache-spec.t
@@ -17,16 +17,15 @@ for my $file (dir('t', 'mustache-spec', 'specs')->children) {
&& $test->{name} =~ /standalone/i
&& $test->{name} !~ /line endings/i;
+ my $opts = {
+ suffix => '.mustache',
+ path => [
+ map { +{ "$_.mustache" => $test->{partials}{$_} } }
+ keys %{ $test->{partials} }
+ ],
+ };
render_ok(
- ($test->{partials}
- ? ({
- suffix => '.mustache',
- path => [
- map { +{ "$_.mustache" => $test->{partials}{$_} } }
- keys %{ $test->{partials} }
- ]
- })
- : ()),
+ $opts,
$test->{template},
fix_data($test->{data}),
$test->{expected},