File: PluginTestApp.pm

package info (click to toggle)
libcatalyst-perl 5.90132-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,016 kB
  • sloc: perl: 11,061; makefile: 7
file content (28 lines) | stat: -rw-r--r-- 839 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package PluginTestApp;
use Test::More;

use Catalyst (
    'Test::Plugin',
    '+TestApp::Plugin::FullyQualified',
    (eval { require MooseX::Role::Parameterized; 1 }
        ? ('+TestApp::Plugin::ParameterizedRole' => { method_name => 'affe' })
        : ()),
);

sub _test_plugins {
    my $c = shift;
    is_deeply [ $c->registered_plugins ],
    [
        qw/Catalyst::Plugin::Test::Plugin
        TestApp::Plugin::FullyQualified/
    ],
    '... and it should report the correct plugins';
    ok $c->registered_plugins('Catalyst::Plugin::Test::Plugin'),
    '... or if we have a particular plugin';
    ok $c->registered_plugins('Test::Plugin'),
    '... even if it is not fully qualified';
    ok !$c->registered_plugins('No::Such::Plugin'),
    '... and it should return false if the plugin does not exist';
}

__PACKAGE__->setup;