Commit | Line | Data |
9ffa533a |
1 | #!/usr/bin/env perl |
2 | use strict; |
3 | use warnings; |
83d0a1f4 |
4 | use Test::More tests => 5; |
9ffa533a |
5 | |
6 | do { |
7 | package Role; |
8 | use Mouse::Role; |
9 | |
10 | no Mouse::Role; |
11 | }; |
12 | |
13 | ok(Role->meta, "Role has a meta"); |
14 | isa_ok(Role->meta, "Mouse::Meta::Role"); |
15 | |
513854c7 |
16 | is(Role->meta->name, "Role"); |
17 | |
05c74c22 |
18 | ok(!Role->meta->has_attribute('attr'), "Role doesn't have attr attribute yet"); |
19 | |
20 | do { |
21 | package Role; |
22 | use Mouse::Role; |
23 | |
24 | has 'attr'; |
25 | |
26 | no Mouse::Role; |
27 | }; |
28 | |
29 | ok(Role->meta->has_attribute('attr'), "Role has an attr now"); |