X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frole-duplication.t;h=b44629c7dccc353f4f51ede4e3dee2cc1a3d418f;hb=d2af51c61ea875770e562beb4373c9908e29b9bd;hp=f92d5ebeffeac47c22d09ca28ca9139f743e367b;hpb=2c580674e210e2252672aa0bb691887f46c7d846;p=gitmo%2FRole-Tiny.git diff --git a/t/role-duplication.t b/t/role-duplication.t index f92d5eb..b44629c 100644 --- a/t/role-duplication.t +++ b/t/role-duplication.t @@ -1,14 +1,15 @@ -use strictures 1; +use strict; +use warnings FATAL => 'all'; use Test::More; { package Role; use Role::Tiny; - around foo => sub { my $orig = shift; 1 + $orig->(@_) }; - package Base; sub foo { 1 } + sub foo { my $orig = shift; 1 + $orig->(@_) }; + package BaseClass; sub foo { 1 } } -eval { Role::Tiny->create_class_with_roles('Base', qw(Role Role)); }; +eval { Role::Tiny->create_class_with_roles('BaseClass', qw(Role Role)); }; -like $@, 'Duplication', 'duplicate role detected'; +like $@, qr/Duplicated/, 'duplicate role detected'; done_testing;