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:
Graham Ollis
2012-12-27 13:21:23 -05:00
parent 6146b1f2f5
commit 1d9ea654e9
8 changed files with 21 additions and 9 deletions
+2 -1
View File
@@ -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';