3 use Catalyst qw[-Engine=Test];
9 $c->res->headers->content_type('text/plain');
13 package TestApp::C::Foo;
18 my ( $self, $c ) = @_;
19 $c->res->output( 'foo' . $c->res->output );
23 my ( $self, $c ) = @_;
24 $c->res->output( 'foo' . $c->res->output );
28 my ( $self, $c ) = @_;
29 $c->res->output( 'foo' . $c->res->output );
33 package TestApp::C::Foo::Bar;
38 my ( $self, $c ) = @_;
39 $c->res->output( $c->res->output . 'bar' );
43 my ( $self, $c ) = @_;
44 $c->res->output( $c->res->output . 'bar' );
48 my ( $self, $c ) = @_;
49 $c->res->output( $c->res->output . 'bar' );
55 use Test::More tests => 2;
56 use Catalyst::Test 'TestApp';
61 my $response = request('/foo');
62 ok( $response->content =~ /foofoofoo/ );
66 my $response = request('/foo/bar');
67 ok( $response->content =~ /foobarfoobarfoobar/ );