Commit | Line | Data |
052a2d89 |
1 | package PluginTestApp; |
2 | use Test::More; |
3 | |
62b6b631 |
4 | use Catalyst ( |
5 | 'Test::Plugin', |
6 | '+TestApp::Plugin::FullyQualified', |
7 | (eval { require MooseX::Role::Parameterized; 1 } |
8 | ? ('+TestApp::Plugin::ParameterizedRole' => { method_name => 'affe' }) |
9 | : ()), |
10 | ); |
052a2d89 |
11 | |
052a2d89 |
12 | sub _test_plugins { |
13 | my $c = shift; |
14 | is_deeply [ $c->registered_plugins ], |
15 | [ |
16 | qw/Catalyst::Plugin::Test::Plugin |
55046410 |
17 | Catalyst::Plugin::Unicode::Encoding |
052a2d89 |
18 | TestApp::Plugin::FullyQualified/ |
55046410 |
19 | ], |
052a2d89 |
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; |