Port from Class::C3 to MRO::Compat.
[p5sagit/Class-C3-Componentised.git] / t / 01-basic.t
CommitLineData
20169807 1use strict;
2use warnings;
3
4use FindBin;
20169807 5use Test::More;
6use Test::Exception;
7
35ef509e 8use lib "$FindBin::Bin/lib";
9
10
20169807 11plan tests => 3;
12
13use_ok('MyModule');
14
15MyModule->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
22throws_ok { MyModule->load_components('+ClassC3ComponentFooThatShouldntExist'); } qr/^Can't locate ClassC3ComponentFooThatShouldntExist.pm in \@INC/;
20169807 23
24is(MyModule->new->message, "Foo MyModule", "it worked");
25