From: Andrew Rodland Date: Thu, 23 Jul 2009 09:32:08 +0000 (+0000) Subject: Test and Changelog entry for r10961. X-Git-Tag: 5.80008~54 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=e1dd56e6f190fe600d63c3d3763efb171f67b274 Test and Changelog entry for r10961. --- diff --git a/Changes b/Changes index 70a4777..cb7ceee 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,9 @@ application class immutable without that option. - Fix POD to refer to ->config(key => $val), rather than ->config->{key} = $val, as the latter form is deprecated. + - Depend on Module::Pluggable 3.9 to prevent a bug wherein components + in inner packages might not be registered. This especially affected + tests. Refactoring / cleanups: - Deleted the Restarter engine and its Watcher code. Use the diff --git a/t/unit_core_component_loading.t b/t/unit_core_component_loading.t index c8098c6..42f1eac 100644 --- a/t/unit_core_component_loading.t +++ b/t/unit_core_component_loading.t @@ -1,7 +1,8 @@ # 2 initial tests, and 6 per component in the loop below # (do not forget to update the number of components in test 3 as well) # 5 extra tests for the loading options -use Test::More tests => 2 + 6 * 24 + 5; +# One test for components in inner packages +use Test::More tests => 2 + 6 * 24 + 5 + 1; use strict; use warnings; @@ -199,4 +200,17 @@ eval "package $appclass; use Catalyst; __PACKAGE__->setup"; is($@, '', "Didn't load component twice"); +$appclass = "InnerComponent"; + +{ + package InnerComponent::Controller::Test; + use base 'Catalyst::Controller'; +} + +$INC{'InnerComponent/Controller/Test.pm'} = 1; + +eval "package $appclass; use Catalyst; __PACKAGE__->setup"; + +isa_ok($appclass->controller('Test'), 'Catalyst::Controller'); + rmtree($libdir);