[Catalyst-commits] r11130 - in
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t:
. aggregate lib lib/TestAppDoubleAutoBug
lib/TestAppDoubleAutoBug/Controller
yousef at dev.catalyst.perl.org
yousef at dev.catalyst.perl.org
Wed Aug 12 00:21:45 GMT 2009
Author: yousef
Date: 2009-08-12 00:21:41 +0000 (Wed, 12 Aug 2009)
New Revision: 11130
Added:
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/Controller/
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/Controller/Root.pm
Modified:
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/aggregate/unit_core_action_for.t
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/custom_live_component_controller_action_auto_doublebug.t
Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug.pm
Log:
Moved action methods from TestAppDoubleAutoBug.pm to a root controller and fixed the tests.
Modified: Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/aggregate/unit_core_action_for.t
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/aggregate/unit_core_action_for.t 2009-08-12 00:15:51 UTC (rev 11129)
+++ Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/aggregate/unit_core_action_for.t 2009-08-12 00:21:41 UTC (rev 11130)
@@ -12,7 +12,7 @@
use_ok('TestApp');
-is(TestApp->action_for('global_action')->code, TestApp->can('global_action'),
+is(TestApp->action_for('global_action')->code, TestApp::Controller::Root->can('global_action'),
'action_for on appclass ok');
is(TestApp->controller('Args')->action_for('args')->code,
Modified: Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/custom_live_component_controller_action_auto_doublebug.t
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/custom_live_component_controller_action_auto_doublebug.t 2009-08-12 00:15:51 UTC (rev 11129)
+++ Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/custom_live_component_controller_action_auto_doublebug.t 2009-08-12 00:21:41 UTC (rev 11130)
@@ -32,9 +32,9 @@
{
my @expected = qw[
- TestAppDoubleAutoBug->auto
- TestAppDoubleAutoBug->default
- TestAppDoubleAutoBug->end
+ TestAppDoubleAutoBug::Controller::Root->auto
+ TestAppDoubleAutoBug::Controller::Root->default
+ TestAppDoubleAutoBug::Controller::Root->end
];
my $expected = join( ", ", @expected );
Added: Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/Controller/Root.pm (rev 0)
+++ Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug/Controller/Root.pm 2009-08-12 00:21:41 UTC (rev 11130)
@@ -0,0 +1,22 @@
+package TestAppDoubleAutoBug::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub auto : Private {
+ my ( $self, $c ) = @_;
+ ++$c->stash->{auto_count};
+ return 1;
+}
+
+sub default : Private {
+ my ( $self, $c ) = @_;
+ $c->res->body( sprintf 'default, auto=%d', $c->stash->{auto_count} );
+}
+
+sub end : Private {
+ my ($self,$c) = @_;
+}
+
+1;
Modified: Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug.pm 2009-08-12 00:15:51 UTC (rev 11129)
+++ Catalyst-Runtime/5.80/branches/deprecate_appclass_actions/t/lib/TestAppDoubleAutoBug.pm 2009-08-12 00:21:41 UTC (rev 11130)
@@ -44,16 +44,3 @@
return $c->SUPER::execute(@_);
}
-
-
-
-sub auto : Private {
- my ( $self, $c ) = @_;
- ++$c->stash->{auto_count};
- return 1;
-}
-
-sub default : Private {
- my ( $self, $c ) = @_;
- $c->res->body( sprintf 'default, auto=%d', $c->stash->{auto_count} );
-}
More information about the Catalyst-commits
mailing list