From: Shawn M Moore Date: Sun, 31 May 2009 02:37:22 +0000 (-0400) Subject: Add Ovid's test case X-Git-Tag: 0.80~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f0916ad8016a27a1361b4fafa469224aab2e9ca0;p=gitmo%2FMoose.git Add Ovid's test case --- diff --git a/t/030_roles/005_role_conflict_detection.t b/t/030_roles/005_role_conflict_detection.t index 9a09acd..7c1f845 100644 --- a/t/030_roles/005_role_conflict_detection.t +++ b/t/030_roles/005_role_conflict_detection.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 87; # it's really 124 with kolibrie's tests; +use Test::More tests => 88; use Test::Exception; =pod @@ -344,6 +344,28 @@ is(Role::Reality->meta->get_method('twist')->(), 'Role::Reality::twist', '... the twist method returns the right value'); +# Ovid's test case from rt.cpan.org #44 +{ + package Role1; + use Moose::Role; + + sub foo {} +} +{ + package Role2; + use Moose::Role; + + sub foo {} +} +{ + package Conflicts; + use Moose; + + ::throws_ok { + with qw(Role1 Role2); + } qr/Due to a method name conflict in roles 'Role1' and 'Role2', the method 'foo' must be implemented by 'Conflicts'/; +} + =pod Role conflicts between attributes and methods