Commit | Line | Data |
052a2d89 |
1 | package PluginTestApp; |
2 | use Test::More; |
baf939ed |
3 | use base 'Catalyst'; |
052a2d89 |
4 | |
62b6b631 |
5 | use Catalyst ( |
6 | 'Test::Plugin', |
7 | '+TestApp::Plugin::FullyQualified', |
8 | (eval { require MooseX::Role::Parameterized; 1 } |
9 | ? ('+TestApp::Plugin::ParameterizedRole' => { method_name => 'affe' }) |
10 | : ()), |
11 | ); |
052a2d89 |
12 | |
052a2d89 |
13 | sub _test_plugins { |
14 | my $c = shift; |
15 | is_deeply [ $c->registered_plugins ], |
16 | [ |
17 | qw/Catalyst::Plugin::Test::Plugin |
18 | TestApp::Plugin::FullyQualified/ |
19 | ], |
20 | '... and it should report the correct plugins'; |
21 | ok $c->registered_plugins('Catalyst::Plugin::Test::Plugin'), |
22 | '... or if we have a particular plugin'; |
23 | ok $c->registered_plugins('Test::Plugin'), |
24 | '... even if it is not fully qualified'; |
25 | ok !$c->registered_plugins('No::Such::Plugin'), |
26 | '... and it should return false if the plugin does not exist'; |
27 | } |
28 | |
29 | __PACKAGE__->setup; |