diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-02 18:12:19 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-02 18:12:19 -0500 |
commit | 94428a37525ef84c4ed075a5dc9dddcf23debd00 (patch) | |
tree | f9154800e86c04e0cc3738fbd46ea002bca3794a /t/mustache-spec.t | |
parent | f5a6d16466fd528171002a137440e9d99eb9129a (diff) | |
download | text-handlebars-94428a37525ef84c4ed075a5dc9dddcf23debd00.tar.gz text-handlebars-94428a37525ef84c4ed075a5dc9dddcf23debd00.zip |
add mustache spec tests - 136/224 passing so far
Diffstat (limited to 't/mustache-spec.t')
-rw-r--r-- | t/mustache-spec.t | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/mustache-spec.t b/t/mustache-spec.t new file mode 100644 index 0000000..eb30391 --- /dev/null +++ b/t/mustache-spec.t @@ -0,0 +1,25 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use lib 't/lib'; +use Test::More; +use Test::Handlebars; + +use Test::Requires 'JSON', 'Path::Class'; + +for my $file (dir('t', 'mustache-spec', 'specs')->children) { + next unless $file =~ /\.json$/; + next if $file->basename =~ /^~/; # for now + my $tests = decode_json($file->slurp); + diag("running " . $file->basename . " tests"); + for my $test (@{ $tests->{tests} }) { + render_ok( + $test->{template}, + $test->{data}, + $test->{expected}, + "$test->{name}: $test->{desc}" + ); + } +} + +done_testing; |