use inlined module hiding in tests
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_action_go.t
index 1e7a529..60f8bb8 100644 (file)
@@ -1,5 +1,3 @@
-#!perl
-
 use strict;
 use warnings;
 
@@ -11,6 +9,7 @@ our $iters;
 BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
 
 use Test::More tests => 54 * $iters;
+use Catalyst;
 use Catalyst::Test 'TestApp';
 
 if ( $ENV{CAT_BENCHMARK} ) {
@@ -42,7 +41,7 @@ sub run_tests {
           TestApp::Controller::Action::Go->four
           TestApp::Controller::Action::Go->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -73,7 +72,7 @@ sub run_tests {
         my @expected = qw[
           TestApp::Controller::Action::Go->go_die
           TestApp::Controller::Action::Go->args
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -164,7 +163,7 @@ sub run_tests {
           TestApp::Controller::Action::Go->four
           TestApp::Controller::Action::Go->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -199,7 +198,7 @@ sub run_tests {
           TestApp::Controller::Action::Go->four
           TestApp::Controller::Action::Go->five
           TestApp::View::Dump::Request->process
-          TestApp->end
+          TestApp::Controller::Root->end
         ];
 
         @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected;
@@ -241,7 +240,7 @@ sub run_tests {
         );
         ok( !$response->is_success, 'Response Fails' );
         is( $response->content,
-            q(FATAL ERROR: Couldn't go("TestApp"): Action has no namespace: cannot go() to a plain method or component, must be a :Action or some sort.),
+            q(FATAL ERROR: Couldn't go("TestApp"): Action has no namespace: cannot go() to a plain method or component, must be an :Action of some sort.),
             'Error message'
         );
     }
@@ -261,7 +260,7 @@ sub run_tests {
         ok( my $response = request('http://localhost/action/go/go_chained'), 'go to chained + subcontroller endpoint' );
         is( $response->header('X-Catalyst-Executed'),
             $expected, 'Executed actions' );
-        is( $response->content, '; 1', 'Content OK' );
+        is( $response->content, 'captureme; arg1, arg2', 'Content OK' );
     }
 
 }