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