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?a=commitdiff_plain;h=bfb7eea97cc8bf7d6d2948b4f648c3ceb4b97153;p=gitmo%2FMoose.git 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;