Commit | Line | Data |
---|---|---|
3f7169a2 RGS |
1 | #!perl -w |
2 | ||
3 | use strict; | |
4 | use FindBin; | |
5 | use lib "$FindBin::Bin/lib"; | |
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); | |
14 | ok(@plugins = sort $foo->plugins); | |
15 | is_deeply(\@plugins, \@expected); | |
16 | ||
17 | ||
18 | package MyTest; | |
19 | use File::Spec::Functions qw(catdir); | |
20 | use strict; | |
21 | use Module::Pluggable search_path => "Acme::MyTest::Plugin", search_dirs => "t/acme" ; | |
22 | ||
23 | ||
24 | sub new { | |
25 | my $class = shift; | |
26 | return bless {}, $class; | |
27 | ||
28 | } | |
29 | 1; | |
30 |