whitespace cleanup
[catagits/Catalyst-Runtime.git] / t / lib / PluginTestApp.pm
1 package PluginTestApp;
2 use Test::More;
3
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 );
11
12 sub _test_plugins {
13     my $c = shift;
14     is_deeply [ $c->registered_plugins ],
15     [
16         qw/Catalyst::Plugin::Test::Plugin
17         TestApp::Plugin::FullyQualified/
18     ],
19     '... and it should report the correct plugins';
20     ok $c->registered_plugins('Catalyst::Plugin::Test::Plugin'),
21     '... or if we have a particular plugin';
22     ok $c->registered_plugins('Test::Plugin'),
23     '... even if it is not fully qualified';
24     ok !$c->registered_plugins('No::Such::Plugin'),
25     '... and it should return false if the plugin does not exist';
26 }
27
28 __PACKAGE__->setup;