1 use Test::More tests => 13;
9 qw/C::Controller M::Model V::View Controller::C Model::M View::V Controller::Model::Dummy::Model Model::Dummy::Model/;
12 bless $thingie,'MyApp::Model::Test::Object';
13 push @complist,$thingie;
18 use base qw/Catalyst/;
20 __PACKAGE__->components( { map { ( ref($_)||$_ , $_ ) } @complist } );
23 is( MyApp->view('View'), 'MyApp::V::View', 'V::View ok' );
25 is( MyApp->controller('Controller'),
26 'MyApp::C::Controller', 'C::Controller ok' );
28 is( MyApp->model('Model'), 'MyApp::M::Model', 'M::Model ok' );
30 is( MyApp->model('Dummy::Model'), 'MyApp::Model::Dummy::Model', 'Model::Dummy::Model ok' );
32 isa_ok( MyApp->model('Test::Object'), 'MyApp::Model::Test::Object', 'Test::Object ok' );
34 is( MyApp->controller('Model::Dummy::Model'), 'MyApp::Controller::Model::Dummy::Model', 'Controller::Model::Dummy::Model ok' );
36 is( MyApp->view('V'), 'MyApp::View::V', 'View::V ok' );
38 is( MyApp->controller('C'), 'MyApp::Controller::C', 'Controller::C ok' );
40 is( MyApp->model('M'), 'MyApp::Model::M', 'Model::M ok' );
42 is_deeply( [ sort MyApp->views ],
46 is_deeply( [ sort MyApp->controllers ],
47 [ qw/C Controller Model::Dummy::Model/ ],
50 is_deeply( [ sort MyApp->models ],
51 [ qw/Dummy::Model M Model Test::Object/ ],