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
+4 -1
View File
@@ -11,11 +11,14 @@ use Test::More tests => 3;
use Mojolicious::Lite;
use Test::Mojo;
use File::Temp qw( tempdir tempfile );
my($fh_log,$filename_log) = tempfile('fooXXXXX', TMPDIR => 1, UNLINK => 1);
# Silence
app->log->level('fatal');
app->log->path($filename_log);
plugin 'tt_renderer';
plugin 'tt_renderer' => {template_options => { COMPILE_DIR => tempdir( CLEANUP => 1 ) }};
get '/exception' => sub { die };