[Catalyst-commits] r11886 - in
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib:
. TestApp TestAppOneView
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Wed Nov 18 08:27:12 GMT 2009
Author: zby
Date: 2009-11-18 08:27:11 +0000 (Wed, 18 Nov 2009)
New Revision: 11886
Added:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppOneView/Context.pm
Modified:
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp/Context.pm
Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppOneView.pm
Log:
finalize_errors is in Context now (t/aggregate/live_component_controller_action_go.t line 114 for exampel)
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp/Context.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp/Context.pm 2009-11-18 07:00:22 UTC (rev 11885)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp/Context.pm 2009-11-18 08:27:11 UTC (rev 11886)
@@ -54,5 +54,16 @@
return $c->SUPER::execute(@_);
}
+# Replace the very large HTML error page with
+# useful info if something crashes during a test
+sub finalize_error {
+ my $c = shift;
+
+ $c->next::method(@_);
+
+ $c->res->status(500);
+ $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
+}
+
1;
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp.pm 2009-11-18 07:00:22 UTC (rev 11885)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestApp.pm 2009-11-18 08:27:11 UTC (rev 11886)
@@ -24,17 +24,6 @@
TestApp->context_class( 'TestApp::Context' );
TestApp->setup;
-# Replace the very large HTML error page with
-# useful info if something crashes during a test
-sub finalize_error {
- my $c = shift;
-
- $c->next::method(@_);
-
- $c->res->status(500);
- $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
-}
-
{
no warnings 'redefine';
sub Catalyst::Log::error { }
Added: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppOneView/Context.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppOneView/Context.pm (rev 0)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppOneView/Context.pm 2009-11-18 08:27:11 UTC (rev 11886)
@@ -0,0 +1,17 @@
+package TestAppOneView::Context;
+use Moose;
+extends 'Catalyst::Context';
+
+# Replace the very large HTML error page with
+# useful info if something crashes during a test
+sub finalize_error {
+ my $c = shift;
+
+ $c->next::method(@_);
+
+ $c->res->status(500);
+ $c->res->body( 'FATAL ERROR: ' . join( ', ', @{ $c->error } ) );
+}
+
+1;
+
Modified: Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppOneView.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppOneView.pm 2009-11-18 07:00:22 UTC (rev 11885)
+++ Catalyst-Runtime/5.80/branches/basic-app-ctx-separation-cleaned/t/lib/TestAppOneView.pm 2009-11-18 08:27:11 UTC (rev 11886)
@@ -2,7 +2,10 @@
use strict;
use warnings;
use Catalyst;
+use TestAppOneView::Context;
+TestAppOneView->context_class( 'TestAppOneView::Context' );
+
__PACKAGE__->setup;
1;
More information about the Catalyst-commits
mailing list