Commit | Line | Data |
af3ff00e |
1 | use Test::More tests => 7; |
2 | use strict; |
3 | use warnings; |
4 | |
5 | use_ok('Catalyst'); |
6 | |
7 | my @complist = |
8 | map { "MyApp::$_"; } |
9 | qw/C::Controller M::Model V::View Controller::C Model::M View::V/; |
10 | |
11 | { |
12 | |
13 | package MyApp; |
14 | |
15 | use base qw/Catalyst/; |
16 | |
17 | __PACKAGE__->components( { map { ( $_, $_ ) } @complist } ); |
18 | } |
19 | |
20 | is( MyApp->view('View'), 'MyApp::V::View', 'V::View ok' ); |
21 | |
22 | is( MyApp->controller('Controller'), |
23 | 'MyApp::C::Controller', 'C::Controller ok' ); |
24 | |
25 | is( MyApp->model('Model'), 'MyApp::M::Model', 'M::Model ok' ); |
26 | |
27 | is( MyApp->view('V'), 'MyApp::View::V', 'View::V ok' ); |
28 | |
29 | is( MyApp->controller('C'), 'MyApp::Controller::C', 'Controller::C ok' ); |
30 | |
31 | is( MyApp->model('M'), 'MyApp::Model::M', 'Model::M ok' ); |