Detect redispatch exceptions by a class check, not by checking the exception message.
[catagits/Catalyst-Runtime.git] / t / unit_metaclass_compat_non_moose_controller.t
CommitLineData
2f5cb070 1use Catalyst ();
2
3{
42ef9eed 4 package TestApp;
5 use base qw/Catalyst/;
6}
7{
2f5cb070 8 package TestApp::Controller::Base;
9 use base qw/Catalyst::Controller/;
10}
11{
12 package TestApp::Controller::Other;
13 use base qw/TestApp::Controller::Base/;
14}
15
42ef9eed 16TestApp->setup_component('TestApp::Controller::Other');
17TestApp->setup_component('TestApp::Controller::Base');
2f5cb070 18
19use Test::More tests => 1;
20use Test::Exception;
21
22# Metaclass init order causes fail.
23# There are TODO tests in Moose for this, see
24# f2391d17574eff81d911b97be15ea51080500003
25# after which the evil kludge in core can die in a fire.
26
27lives_ok {
28 TestApp::Controller::Base->get_action_methods
29} 'Base class->get_action_methods ok when sub class initialized first';
30