use strict;
use warnings;
-use Test::More tests => 39;
+use Test::More;
use Test::Exception;
-
{
# test no conflicts here
package Role::A;
{
# check that when a role is added to another role
- # and they conflict and the method they conflicted
+ # and they conflict and the method they conflict
# with is then required.
package Role::A::Conflict;
::throws_ok {
with 'Role::A::Conflict';
- } qr/requires.*'bar'/, '... did not fufill the requirement of &bar method';
+ } qr/Due to a method name conflict in roles 'Role::A' and 'Role::A::Conflict', the method 'bar' must be implemented or excluded by 'Class::A::Conflict'/, '... did not fufill the requirement of &bar method';
package Class::A::Resolved;
use Moose;
::throws_ok {
with qw(Role::I);
- } qr/requires.*'foo'/, "defining class Class::C fails";
+ } qr/Due to a method name conflict in roles 'Role::H' and 'Role::J', the method 'foo' must be implemented or excluded by 'Class::C'/, "defining class Class::C fails";
sub zot { 'Class::C::zot' }
}
+done_testing;