Commit | Line | Data |
836e1134 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
d0d4d785 |
6 | use Test::More tests => 22; |
836e1134 |
7 | |
8 | use lib 't/lib'; |
9 | |
10 | { |
11 | |
12 | package Faux::Plugin; |
13 | |
14 | sub new { bless {}, shift } |
15 | my $count = 1; |
16 | sub count { $count++ } |
17 | } |
18 | |
836e1134 |
19 | use Catalyst::Test qw/PluginTestApp/; |
20 | |
21 | ok( get("/compile_time_plugins"), "get ok" ); |
22 | ok( get("/run_time_plugins"), "get ok" ); |
d0d4d785 |
23 | |
24 | use_ok 'TestApp'; |
25 | my @expected = qw( |
26 | Catalyst::Plugin::Test::Errors |
27 | Catalyst::Plugin::Test::Headers |
d13a7137 |
28 | Catalyst::Plugin::Test::Inline |
d0d4d785 |
29 | Catalyst::Plugin::Test::Plugin |
30 | TestApp::Plugin::FullyQualified |
31 | ); |
32 | |
33 | # Faux::Plugin is no longer reported |
34 | is_deeply [ TestApp->registered_plugins ], \@expected, |
35 | 'registered_plugins() should only report the plugins for the current class'; |