X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02.stdout.t;h=462e8174cce2f6cc5314c3b4c08f79594089f923;hb=10769ed347f340ee0e81d85933ae8f82ff0413da;hp=4d596c103aa5a51375809ebe461711fafa3107f4;hpb=43d819aadfa20bc9f450971a57b092da28736e1b;p=gitmo%2FMooseX-Daemonize.git diff --git a/t/02.stdout.t b/t/02.stdout.t index 4d596c1..462e817 100644 --- a/t/02.stdout.t +++ b/t/02.stdout.t @@ -1,4 +1,4 @@ -use Test::More no_plan => 1; +use Test::More 'no_plan'; use Test::Builder; use Test::MooseX::Daemonize; use MooseX::Daemonize; @@ -30,16 +30,18 @@ my $Test = Test::Builder->new; } package main; -use Cwd; use strict; use warnings; +use File::Spec::Functions; +use File::Temp qw(tempdir); + +my $dir = tempdir( CLEANUP => 1 ); + ## Try to make sure we are in the test directory -chdir 't' if ( Cwd::cwd() !~ m|/t$| ); -my $cwd = Cwd::cwd(); my $app = TestOutput->new( - pidbase => $cwd, - test_output => join( '/', $cwd, 'results' ), + pidbase => $dir, + test_output => catfile($dir, 'results'), ); daemonize_ok( $app, 'child forked okay' ); sleep(3); # give ourself a chance to produce some output