Commit | Line | Data |
20169807 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use FindBin; |
20169807 |
5 | use Test::More; |
6 | use Test::Exception; |
7 | |
35ef509e |
8 | use lib "$FindBin::Bin/lib"; |
9 | |
10 | |
20169807 |
11 | plan tests => 3; |
12 | |
13 | use_ok('MyModule'); |
14 | |
15 | MyModule->load_components('Foo'); |
16 | |
35ef509e |
17 | # Clear down inc so ppl dont mess us up with installing modules that we |
18 | # expect not to exist |
4a196a90 |
19 | #@INC = (); |
20 | # This breaks Carp1.08/perl 5.10.0; bah |
35ef509e |
21 | |
22 | throws_ok { MyModule->load_components('+ClassC3ComponentFooThatShouldntExist'); } qr/^Can't locate ClassC3ComponentFooThatShouldntExist.pm in \@INC/; |
20169807 |
23 | |
24 | is(MyModule->new->message, "Foo MyModule", "it worked"); |
25 | |