[Catalyst-commits] r11131 - in Catalyst-Runtime/5.80/trunk/t: . lib
lib/TestAppNonMooseController
lib/TestAppNonMooseController/Controller
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Aug 12 01:09:09 GMT 2009
Author: t0m
Date: 2009-08-12 01:09:09 +0000 (Wed, 12 Aug 2009)
New Revision: 11131
Added:
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm
Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm
Modified:
Catalyst-Runtime/5.80/trunk/t/unit_metaclass_compat_non_moose_controller.t
Log:
Split test out into a more proper app, so that the test no longer relies on the metaclass initialization hacking occurring in ->setup_component, as I want to move it
Added: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/Controller/Foo.pm 2009-08-12 01:09:09 UTC (rev 11131)
@@ -0,0 +1,5 @@
+package TestAppNonMooseController::Controller::Foo;
+use base qw/TestAppNonMooseController::ControllerBase/;
+
+1;
+
Added: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController/ControllerBase.pm 2009-08-12 01:09:09 UTC (rev 11131)
@@ -0,0 +1,5 @@
+package TestAppNonMooseController::ControllerBase;
+use base qw/Catalyst::Controller/;
+
+1;
+
Added: Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppNonMooseController.pm 2009-08-12 01:09:09 UTC (rev 11131)
@@ -0,0 +1,8 @@
+package TestAppNonMooseController;
+use base qw/Catalyst/;
+use Catalyst;
+
+__PACKAGE__->setup;
+
+1;
+
Modified: Catalyst-Runtime/5.80/trunk/t/unit_metaclass_compat_non_moose_controller.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_metaclass_compat_non_moose_controller.t 2009-08-12 00:21:41 UTC (rev 11130)
+++ Catalyst-Runtime/5.80/trunk/t/unit_metaclass_compat_non_moose_controller.t 2009-08-12 01:09:09 UTC (rev 11131)
@@ -1,23 +1,12 @@
-use Catalyst ();
+use strict;
+use warnings;
-{
- package TestApp;
- use base qw/Catalyst/;
-}
-{
- package TestApp::Controller::Base;
- use base qw/Catalyst::Controller/;
-}
-{
- package TestApp::Controller::Other;
- use base qw/TestApp::Controller::Base/;
-}
+use FindBin;
+use lib "$FindBin::Bin/lib";
-TestApp->setup_component('TestApp::Controller::Other');
-TestApp->setup_component('TestApp::Controller::Base');
-
use Test::More tests => 1;
use Test::Exception;
+use TestAppNonMooseController;
# Metaclass init order causes fail.
# There are TODO tests in Moose for this, see
@@ -25,6 +14,6 @@
# after which the evil kludge in core can die in a fire.
lives_ok {
- TestApp::Controller::Base->get_action_methods
+ TestAppNonMooseController::ControllerBase->get_action_methods
} 'Base class->get_action_methods ok when sub class initialized first';
More information about the Catalyst-commits
mailing list