Commit | Line | Data |
60ad2cb7 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use lib 't/lib', 'lib'; |
7 | |
8 | use Test::More tests => 4; |
9 | use Test::Exception; |
10 | |
11 | |
12 | |
13 | { |
14 | |
15 | package Bar; |
16 | use Mouse; |
17 | |
18 | ::lives_ok { extends 'Foo' } 'loaded Foo superclass correctly'; |
19 | } |
20 | |
21 | { |
22 | |
23 | package Baz; |
24 | use Mouse; |
25 | |
26 | ::lives_ok { extends 'Bar' } 'loaded (inline) Bar superclass correctly'; |
27 | } |
28 | |
29 | { |
30 | |
31 | package Foo::Bar; |
32 | use Mouse; |
33 | |
34 | ::lives_ok { extends 'Foo', 'Bar' } |
35 | 'loaded Foo and (inline) Bar superclass correctly'; |
36 | } |
37 | |
38 | { |
39 | |
40 | package Bling; |
41 | use Mouse; |
42 | |
43 | ::throws_ok { extends 'No::Class' } |
44 | qr{Can't locate No/Class\.pm in \@INC}, |
45 | 'correct error when superclass could not be found'; |
46 | } |
47 | |