use temp COMPILE_DIR to avoid test failures
where the default COMPILE_DIR already exists and is owned by another user or not writable for some other reason by the testing user.
This commit is contained in:
+2
-1
@@ -11,6 +11,7 @@ use Test::More tests => 6;
|
||||
|
||||
use Mojolicious::Lite;
|
||||
use Test::Mojo;
|
||||
use File::Temp qw( tempdir );
|
||||
|
||||
# Silence
|
||||
app->log->level('fatal');
|
||||
@@ -18,7 +19,7 @@ app->log->level('fatal');
|
||||
my @paths = map { app->home->rel_dir($_) } "templates/multiple_first", "templates/multiple_second";
|
||||
app->renderer->paths([@paths]);
|
||||
|
||||
plugin 'TtRenderer';
|
||||
plugin 'TtRenderer' => {template_options => { COMPILE_DIR => tempdir( CLEANUP => 1 ) }};
|
||||
|
||||
get '/first' => 'first';
|
||||
get '/second' => 'second';
|
||||
|
||||
Reference in New Issue
Block a user