Update stash key from 'template_path' to 'template' to match mojo change

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
This commit is contained in:
giftnuss
2009-07-30 02:05:21 +02:00
committed by Ask Bjørn Hansen
parent 460b36497a
commit 165c3b39f2
2 changed files with 3 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ sub _init {
sub _render {
my ($self, $renderer, $c, $output) = @_;
my $template_path = $c->stash->{template_path};
my $template_path = $c->stash->{template};
unless (
$self->tt->process(

View File

@@ -17,13 +17,13 @@ my $mt = MojoX::Renderer::TT->build;
my $output;
my $rv;
$c->stash->{template_path} = 't/render/template.tt2';
$c->stash->{template} = 't/render/template.tt2';
$rv = $mt->(undef, $c, \$output);
is($rv, 1);
is($output, "4\n");
$c->stash->{template_path} = 't/render/error.tt2';
$c->stash->{template} = 't/render/error.tt2';
$rv = $mt->(undef, $c, \$output);
is($rv, 0);
ok($output);