6 use Test::MooseX::Daemonize;
9 my $Test = Test::Builder->new;
15 with qw(MooseX::Daemonize);
16 with qw(Test::MooseX::Daemonize::Testable); # setup our test environment
28 $Test->ok( $count++, "$count output_ok" );
39 use File::Spec::Functions;
40 use File::Temp qw(tempdir);
42 my $dir = tempdir( CLEANUP => 1 );
44 ## Try to make sure we are in the test directory
45 my $app = TestOutput->new(
47 test_output => catfile($dir, 'results'),
49 daemonize_ok( $app, 'child forked okay' );
50 sleep(3); # give ourself a chance to produce some output
54 local $SIG{__WARN__} = sub { $warnings .= $_[0]; warn @_ };
55 $app->stop( no_exit => 1 );
58 is($warnings, "", "No warnings from stop");
60 check_test_output($app);
61 unlink( $app->test_output );