9 # if we autoclean here there's nothing left and then load_class tries
10 # to require Foo during Moose application and everything breaks.
15 use namespace::autoclean;
28 ::ok(!__PACKAGE__->can('has'), 'No has function after no Moose;');
29 Moose::with('Baz', 'Bar');
32 ::is(Baz->can('thing'), Bar->can('thing'), 'Role copies method correctly');
33 ::ok(Baz->can('attr'), 'Attr accessor correct');
34 ::ok(!Bar->can('has'), 'Moo::Role sugar removed by autoclean');
35 ::ok(!Bar->can('with'), 'Role::Tiny sugar removed by autoclean');
36 ::ok(!Baz->can('has'), 'Sugar not copied');
53 default => sub { [] },
66 Buh->new->push_attr(1);
67 }, undef, 'traits in role attributes are inflated properly';