Commit | Line | Data |
34a69e36 |
1 | use strictures 1; |
2 | use Test::More; |
3 | |
4 | { |
5 | package Spoon; |
6 | |
7 | use Moo; |
8 | |
9 | no warnings 'redefine'; |
10 | |
11 | sub has { "has!" } |
12 | |
13 | no Moo; |
14 | } |
15 | |
108f8ddc |
16 | { |
17 | package Roller; |
18 | |
19 | use Moo::Role; |
20 | |
21 | no warnings 'redefine'; |
22 | |
23 | sub with { "with!" } |
24 | |
25 | no Moo::Role; |
26 | } |
27 | |
34a69e36 |
28 | ok(!Spoon->can('extends'), 'extends cleaned'); |
29 | is(Spoon->has, "has!", 'has left alone'); |
30 | |
108f8ddc |
31 | ok(!Roller->can('has'), 'has cleaned'); |
32 | is(Roller->with, "with!", 'with left alone'); |
33 | |
34a69e36 |
34 | done_testing; |