Commit | Line | Data |
3f7169a2 |
1 | #!perl -w |
2 | |
3 | use strict; |
4 | use FindBin; |
183ac38d |
5 | use lib (($FindBin::Bin."/lib")=~/^(.*)$/); |
3f7169a2 |
6 | use Test::More tests => 3; |
7 | |
8 | |
9 | my $foo; |
10 | ok($foo = MyTest->new()); |
11 | |
12 | my @plugins; |
13 | my @expected = qw(Acme::MyTest::Plugin::Foo MyTest::Extend::Plugin::Bar); |
14 | ok(@plugins = sort $foo->plugins); |
15 | |
16 | is_deeply(\@plugins, \@expected); |
17 | |
18 | |
19 | |
20 | package MyTest; |
21 | use File::Spec::Functions qw(catdir); |
22 | use strict; |
23 | use File::Spec::Functions qw(catdir); |
24 | use Module::Pluggable (search_path => ["MyTest::Extend::Plugin", "Acme::MyTest::Plugin"]); |
25 | |
26 | |
27 | sub new { |
28 | my $class = shift; |
29 | return bless {}, $class; |
30 | |
31 | } |
32 | 1; |
33 | |