Subject: | Test::Mojo can't find .tt templates |
use Test::Mojo;
$t->get_ok('/test1')->status_is(200,'got 200 from route with .ep template');
$t->get_ok('/test2')->status_is(200,'got 200 from route with .tt template');
these trivial routes are identical (details below) except that the 1st
uses a .ep template and the 2nd uses a .tt template. both routes work
correctly via a web browser through the standalone server on port 3000.
when run from main dir via "perl -I./lib t/basic.t" OR via the generated
Makefile, the 1st test pases but the 2nd one returns a 500 w/ "error
Mojolicious::Controller:179 [14789]: file error -
templates/example/test2.html.tt: No such file or directory" in
development.log
in startup:
$self->plugin('tt_renderer');
my $r = $self->routes;
$r->route('/test1')->to('example#test1');
$r->route('/test2')->to('example#test2');
in Example.pm:
sub test1 {
shift->render;
}
sub test2 {
shift->render;
}
in templates/example/test1.html.ep
yeah ok, in ep
in templates/example/test2.html.tt
yeah ok, in tt