Commit | Line | Data |
3f7169a2 |
1 | #!perl -w |
2 | |
3 | use strict; |
4 | use FindBin; |
5 | use lib "$FindBin::Bin/lib"; |
6 | use Test::More tests => 5; |
7 | |
8 | my $foo; |
9 | ok($foo = MyOtherTest->new()); |
10 | |
11 | my @plugins; |
12 | my @expected = qw(MyOtherTest::Plugin::Bar MyOtherTest::Plugin::Foo MyOtherTest::Plugin::Quux MyOtherTest::Plugin::Quux::Foo); |
13 | ok(@plugins = sort $foo->plugins); |
14 | |
15 | |
16 | |
17 | is_deeply(\@plugins, \@expected, "is deeply"); |
18 | |
19 | @plugins = (); |
20 | |
21 | ok(@plugins = sort MyOtherTest->plugins); |
22 | |
23 | |
24 | |
25 | |
26 | is_deeply(\@plugins, \@expected, "is deeply class"); |
27 | |
28 | |
29 | |
30 | package MyOtherTest; |
31 | |
32 | use strict; |
33 | use Module::Pluggable; |
34 | |
35 | |
36 | sub new { |
37 | my $class = shift; |
38 | return bless {}, $class; |
39 | |
40 | } |
41 | 1; |
42 | |