[Catalyst-commits] r11220 - Catalyst-Runtime/5.80/trunk/t
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Sun Aug 23 18:42:18 GMT 2009
Author: rafl
Date: 2009-08-23 18:42:17 +0000 (Sun, 23 Aug 2009)
New Revision: 11220
Modified:
Catalyst-Runtime/5.80/trunk/t/unit_core_component_loading.t
Log:
Failing test for component loading
Modified: Catalyst-Runtime/5.80/trunk/t/unit_core_component_loading.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_core_component_loading.t 2009-08-23 11:56:09 UTC (rev 11219)
+++ Catalyst-Runtime/5.80/trunk/t/unit_core_component_loading.t 2009-08-23 18:42:17 UTC (rev 11220)
@@ -2,7 +2,7 @@
# (do not forget to update the number of components in test 3 as well)
# 5 extra tests for the loading options
# One test for components in inner packages
-use Test::More tests => 2 + 6 * 24 + 7 + 1;
+use Test::More tests => 2 + 6 * 24 + 8 + 1;
use strict;
use warnings;
@@ -193,8 +193,10 @@
package ${appclass}::Model::TopLevel::Nested;
use base 'Catalyst::Model';
+my \$called=0;
no warnings 'redefine';
-sub COMPONENT { return shift->next::method(\@_); }
+sub COMPONENT { \$called++;return shift->next::method(\@_); }
+sub called { return \$called };
1;
EOF
@@ -202,6 +204,7 @@
eval "package $appclass; use Catalyst; __PACKAGE__->setup";
is($@, '', "Didn't load component twice");
+is($appclass->model('TopLevel::Nested')->called,1, 'COMPONENT called once');
ok($appclass->model('TopLevel::Generated'), 'Have generated model');
is(ref($appclass->model('TopLevel::Generated')), 'FooBarBazQuux',
More information about the Catalyst-commits
mailing list