[Catalyst-commits] r12773 - in Catalyst-View-Mason/branches: . test_fixes/t/lib

arcanez at dev.catalyst.perl.org arcanez at dev.catalyst.perl.org
Fri Jan 29 16:51:51 GMT 2010


Author: arcanez
Date: 2010-01-29 16:51:51 +0000 (Fri, 29 Jan 2010)
New Revision: 12773

Added:
   Catalyst-View-Mason/branches/test_fixes/
Modified:
   Catalyst-View-Mason/branches/test_fixes/t/lib/TestApp.pm
Log:
move test logic from TestApp.pm to TestApp/Controller/Root.pm

Copied: Catalyst-View-Mason/branches/test_fixes (from rev 12772, Catalyst-View-Mason/trunk)

Modified: Catalyst-View-Mason/branches/test_fixes/t/lib/TestApp.pm
===================================================================
--- Catalyst-View-Mason/trunk/t/lib/TestApp.pm	2010-01-29 00:17:06 UTC (rev 12772)
+++ Catalyst-View-Mason/branches/test_fixes/t/lib/TestApp.pm	2010-01-29 16:51:51 UTC (rev 12773)
@@ -34,82 +34,4 @@
 
 __PACKAGE__->setup;
 
-sub test : Local {
-    my ($self, $c) = @_;
-
-    $c->stash->{message} = ($c->request->param('message') || $c->config->{default_message});
-}
-
-sub test_set_template : Local {
-    my ($self, $c) = @_;
-
-    $c->forward('test');
-    $c->stash->{template} = 'test';
-}
-
-sub test_content_type : Local {
-    my ($self, $c) = @_;
-
-    $c->forward('test');
-
-    $c->stash->{template} = '/test';
-
-    $c->response->content_type('text/html; charset=iso8859-1')
-}
-
-sub exception : Local {
-    my ($self, $c) = @_;
-
-    $c->log->abort(1); #silence errors
-}
-
-sub render : Local {
-    my ($self, $c) = @_;
-
-    my $out = $self->view->render(
-            $c, $c->request->param('template'),
-            { param => $c->req->param('param') || '' },
-    );
-
-    $c->response->body($out);
-
-    if (blessed($out) && $out->isa('HTML::Mason::Exception')) {
-        $c->response->status(403);
-    }
-}
-
-sub match : Regex('^match/(\w+)') {
-    my ($self, $c) = @_;
-
-    $c->stash->{message} = $c->request->captures->[0];
-}
-
-sub action_match : Regex('^action_match/(\w+)') {
-    my ($self, $c) = @_;
-
-    $c->stash->{message} = $c->request->captures->[0];
-}
-
-sub globals : Local {
-}
-
-sub additional_globals : Local {
-}
-
-sub comp_path : Local {
-    my ($self, $c) = @_;
-
-    $c->stash->{param} = 'bar';
-}
-
-sub end : Private {
-    my ($self, $c) = @_;
-
-    return 1 if $c->response->status =~ /^3\d\d$/;
-    return 1 if $c->response->body;
-
-    my ($requested_view) = $c->request->param('view');
-    $c->forward($c->view( $requested_view ? "Mason::$requested_view" : () ));
-}
-
 1;




More information about the Catalyst-commits mailing list