Permalink
Browse files

Add tests for templates

  • Loading branch information...
1 parent f3c5678 commit 675b0bb1a502488473052991f639500d8b5c5d90 @tadzik tadzik committed Jun 7, 2012
Showing with 11 additions and 1 deletion.
  1. +1 −1 lib/Bailador.pm
  2. +9 −0 t/04-templates.t
  3. +1 −0 t/templates/simple.tt
View
@@ -51,7 +51,7 @@ sub status(Int $code) is export {
$app.response.code = $code;
}
-sub template(Str $tmpl, @params = []) is export {
+sub template(Str $tmpl, *@params) is export {
$app.template($tmpl, @params);
}
View
@@ -0,0 +1,9 @@
+use Test;
+use Bailador;
+use Bailador::Test;
+
+plan 1;
+
+get '/' => sub { template 't/templates/simple.tt', 'bar' }
+
+response-content-is 'GET', '/', "a happy bar\n";
View
@@ -0,0 +1 @@
+a happy <%= $^a %>

0 comments on commit 675b0bb

Please sign in to comment.