From: Karen Etheridge Date: Wed, 25 Apr 2012 21:23:04 +0000 (-0700) Subject: new failing test case for method conflict detection in roles X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=refs%2Fheads%2Ftopic%2Frole_application_conflict_failure new failing test case for method conflict detection in roles --- diff --git a/t/roles/role_conflict_edge_cases.t b/t/roles/role_conflict_edge_cases.t index 4a6cee7..a833646 100644 --- a/t/roles/role_conflict_edge_cases.t +++ b/t/roles/role_conflict_edge_cases.t @@ -187,4 +187,39 @@ ok(My::Test::Class4->meta->has_attribute('foo'), '... have the attribute foo as is(My::Test::Class4->new->foo, 'Role::Base::foo', '... got the right value from method'); + +TODO: +{ + { + package Failing::Z; + use Moose::Role; + } + { + package Failing::A; + use Moose::Role; + sub foo { 'A' } + } + { + package Failing::B; + use Moose::Role; + with 'Failing::A'; + sub foo { 'B' } + } + { + package Failing::C; + use Moose; + + # this reports a conflict, as it should + #with 'B'; + + our $TODO; + local $TODO = 'the existence of an unrelated role is interfering somehow -- need to investigate'; + ::like( + ::exception { with 'Failing::Z', 'Failing::B' }, + qr/method name conflict/, + 'these roles should not compose without conflicts', + ); + } +} + done_testing;