fix loading inline packages in tests
Graham Knop [Sat, 3 May 2014 04:53:19 +0000 (00:53 -0400)]
t/head_middleware.t
t/psgi_utils.t

index 1171c7b..ff7afcf 100644 (file)
@@ -9,8 +9,9 @@ use Plack::Test;
 # body BUT not so quickly that we fail to calculate the length.  This test
 # exists mainly to prevent regressions.
 
-{  
+{
   package MyApp::Controller::Root;
+  $INC{'MyApp/Controller/Root.pm'} = __FILE__;
 
   use base 'Catalyst::Controller';
 
@@ -25,7 +26,6 @@ use Plack::Test;
   MyApp->setup;
 }
 
-$INC{'MyApp/Controller/Root.pm'} = __FILE__;
 
 Test::More::ok(MyApp->setup);
 
index 829d8e3..15afb9d 100644 (file)
@@ -10,6 +10,7 @@ my $psgi_app = sub {
 
 {
   package MyApp::Controller::Docs;
+  $INC{'MyApp/Controller/Docs.pm'} = __FILE__;
 
   use base 'Catalyst::Controller';
   use Plack::Request;
@@ -31,6 +32,7 @@ my $psgi_app = sub {
   }
 
   package MyApp::Controller::User;
+  $INC{'MyApp/Controller/User.pm'} = __FILE__;
 
   use base 'Catalyst::Controller';
   use Plack::Request;
@@ -89,8 +91,6 @@ my $psgi_app = sub {
     }
   }
 
-  $INC{'MyApp/Controller/User.pm'} = __FILE__;
-
   package MyApp;
   use Catalyst;
   MyApp->setup;