Added inline template support

This commit is contained in:
vti committed 2010-10-05 09:02:39 +02:00
1 parent be2d2ed0ec
commit 201774941a
4 files changed
+29 -9

No files matched your search

+6 -1
View File
@@ -5,7 +5,7 @@ use warnings;
use utf8;
use Test::More tests => 22;
use Test::More tests => 25;
use Mojolicious::Lite;
use Mojo::ByteStream 'b';
@@ -36,6 +36,8 @@ get '/on-disk' => 'foo';
get '/foo/:message' => 'index';
get '/inline' => sub { shift->render(inline => '[% 1 + 1 %]', handler => 'tt') };
my $t = Test::Mojo->new;
# Exception
@@ -68,6 +70,9 @@ $t->get_ok('/on-disk')->content_is("4");
# Not found
$t->get_ok('/not_found')->status_is(404)->content_like(qr/not found/i);
# Inline
$t->get_ok('/inline')->status_is(200)->content_is('2');
__DATA__
@@ index.html.tt