diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-02 15:11:59 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-02 15:31:20 -0500 |
commit | f8163f38482ebe4a48b08a3f49080821e62e383b (patch) | |
tree | 83398b2cd786e538487d13e4d50a547d91b0bbbf /t/expressions.t | |
parent | 5dc5000f75492b6f78d27fab3c56055d4534b5a7 (diff) | |
download | text-handlebars-f8163f38482ebe4a48b08a3f49080821e62e383b.tar.gz text-handlebars-f8163f38482ebe4a48b08a3f49080821e62e383b.zip |
refactor tests
Diffstat (limited to 't/expressions.t')
-rw-r--r-- | t/expressions.t | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/t/expressions.t b/t/expressions.t index 730196f..0a3ebf3 100644 --- a/t/expressions.t +++ b/t/expressions.t @@ -1,34 +1,29 @@ #!/usr/bin/env perl use strict; use warnings; +use lib 't/lib'; use Test::More; +use Test::Handlebars; -use Text::Handlebars; - -my $tx = Text::Handlebars->new; - -is( - $tx->render_string( - '<h1>{{title}}</h1>', - { title => 'Xslate rocks' }, - ), +render_ok( + '<h1>{{title}}</h1>', + { title => 'Xslate rocks' }, '<h1>Xslate rocks</h1>', + "basic variables" ); -is( - $tx->render_string( - '<h1>{{article.title}}</h1>', - { article => { title => 'Hash references rock' } }, - ), +render_ok( + '<h1>{{article.title}}</h1>', + { article => { title => 'Hash references rock' } }, '<h1>Hash references rock</h1>', + ". separator" ); -is( - $tx->render_string( - '<h1>{{article/title}}</h1>', - { article => { title => 'Deprecated syntax does not' } }, - ), +render_ok( + '<h1>{{article/title}}</h1>', + { article => { title => 'Deprecated syntax does not' } }, '<h1>Deprecated syntax does not</h1>', + "/ separator" ); done_testing; |