Commit | Line | Data |
a6f3a029 |
1 | use strict; |
2 | use warnings; |
3 | no warnings 'once'; |
4 | use FindBin qw/$Bin/; |
5 | use lib "$Bin/lib"; |
6 | |
7 | use Test::More; |
8 | |
9 | use File::Spec; |
10 | use File::Temp qw/ tempdir /; |
11 | |
12 | my $temp; |
13 | BEGIN { |
14 | $temp = tempdir( CLEANUP => 1 ); |
15 | |
16 | $ENV{CATALYST_HOME} = $temp; |
94d7a76e |
17 | open(my $psgi, '>', File::Spec->catfile($temp, 'testapp.psgi')) or die; |
a6f3a029 |
18 | print $psgi q{ |
19 | use strict; |
20 | use TestApp; |
21 | |
22 | $main::have_loaded_psgi = 1; |
d5024dd8 |
23 | my $app = TestApp->psgi_app; |
a6f3a029 |
24 | }; |
25 | close($psgi); |
26 | } |
27 | use Catalyst::Test qw/ TestApp /; |
28 | |
a6f3a029 |
29 | ok request('/'); |
a056b99b |
30 | ok $main::have_loaded_psgi; |
a6f3a029 |
31 | |
32 | done_testing; |
33 | |