6 use Test::More tests => 9;
11 use_ok('Moose::Meta::Role::Application::RoleSummation');
12 use_ok('Moose::Meta::Role::Composite');
19 before foo => sub { 'Role::Foo::foo' };
20 around foo => sub { 'Role::Foo::foo' };
21 after foo => sub { 'Role::Foo::foo' };
26 before bar => sub { 'Role::Bar::bar' };
27 around bar => sub { 'Role::Bar::bar' };
28 after bar => sub { 'Role::Bar::bar' };
31 # test simple overrides
33 my $c = Moose::Meta::Role::Composite->new(
39 isa_ok($c, 'Moose::Meta::Role::Composite');
41 is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name');
44 Moose::Meta::Role::Application::RoleSummation->new->apply($c);
45 } '... this succeeds as expected';
48 [ sort $c->get_method_modifier_list('before') ],
50 '... got the right list of methods'
54 [ sort $c->get_method_modifier_list('after') ],
56 '... got the right list of methods'
60 [ sort $c->get_method_modifier_list('around') ],
62 '... got the right list of methods'