silence warnings in tests
[catagits/Catalyst-Runtime.git] / t / head_middleware.t
index 1171c7b..8b8eb6d 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';
 
@@ -22,12 +23,10 @@ use Plack::Test;
   package MyApp;
   use Catalyst;
 
-  MyApp->setup;
+  Test::More::ok(MyApp->setup, 'setup app');
 }
 
-$INC{'MyApp/Controller/Root.pm'} = __FILE__;
 
-Test::More::ok(MyApp->setup);
 
 ok my $psgi = MyApp->psgi_app, 'build psgi app';
 
@@ -44,7 +43,7 @@ test_psgi $psgi, sub {
     my $res = $cb->(HEAD "/root/test");
     is $res->code, 200, 'OK';
     is $res->content, '', 'correct body';
-    is $res->content_length, 16, 'correct length';    
+    is $res->content_length, 16, 'correct length';
 };
 
 done_testing;