Commit | Line | Data |
c3398f5b |
1 | #!/usr/bin/env perl |
2 | use strict; |
3 | use warnings; |
ca73a208 |
4 | use Test::More tests => 7; |
c3398f5b |
5 | use lib 't/lib'; |
6 | |
7 | do { |
8 | package Class; |
9 | use Mouse; |
10 | |
11 | package Child; |
12 | use Mouse; |
13 | extends 'Class'; |
14 | |
15 | package Mouse::TestClass; |
16 | use Mouse; |
abe28e11 |
17 | extends 'Unsweetened'; |
c3398f5b |
18 | |
19 | sub mouse { 1 } |
20 | }; |
21 | |
22 | can_ok(Child => 'new'); |
23 | |
24 | my $child = Child->new; |
25 | |
26 | isa_ok($child => 'Child'); |
27 | isa_ok($child => 'Class'); |
28 | isa_ok($child => 'Mouse::Object'); |
29 | |
abe28e11 |
30 | can_ok('Mouse::TestClass' => qw(mouse unsweetened)); |
c3398f5b |
31 | |
ca73a208 |
32 | eval " |
33 | package Child; |
34 | use Mouse; |
35 | "; |
36 | |
37 | isa_ok($child => 'Class'); |
38 | isa_ok($child => 'Mouse::Object'); |
39 | |