X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fpsgi_file_testapp_engine_psgi_compat.t;h=1f5b4d95030b7536fff0f4360a9d6a461d28af02;hb=94d7a76e1f113e306327a86cbdbcae2afd428f0a;hp=af16bc4e2a249158f660539eb1cd1081959de99a;hpb=862d6713da1c7d001a4637cc0967d78b3bedfd7d;p=catagits%2FCatalyst-Runtime.git diff --git a/t/psgi_file_testapp_engine_psgi_compat.t b/t/psgi_file_testapp_engine_psgi_compat.t index af16bc4..1f5b4d9 100644 --- a/t/psgi_file_testapp_engine_psgi_compat.t +++ b/t/psgi_file_testapp_engine_psgi_compat.t @@ -14,7 +14,7 @@ BEGIN { $temp = tempdir( CLEANUP => 1 ); $ENV{CATALYST_HOME} = $temp; - open(my $psgi, '>', File::Spec->catdir($temp, 'testapp.psgi')) or die; + open(my $psgi, '>', File::Spec->catfile($temp, 'testapp.psgi')) or die; print $psgi q{ use strict; use TestApp; @@ -27,8 +27,14 @@ BEGIN { } use Catalyst::Test qw/ TestApp /; -ok $main::have_loaded_psgi; -ok request('/'); +ok !$main::have_loaded_psgi, 'legacy psgi file got ignored'; + +like do { + my $warning; + local $SIG{__WARN__} = sub { $warning = $_[0] }; + ok request('/'); + $warning; +}, qr/ignored/, 'legacy psgi files raise a warning'; done_testing;