X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcompose-non-role.t;fp=t%2Fcompose-non-role.t;h=413fe80f264345b278dcd13d9e9d1f7bc57c264d;hb=c2afd0396de074dd5dbea1e4eaeedbf6fc070743;hp=0000000000000000000000000000000000000000;hpb=7a9263a9abc235f6fa02247c7dd2ab72183ecbda;p=gitmo%2FMoo.git diff --git a/t/compose-non-role.t b/t/compose-non-role.t new file mode 100644 index 0000000..413fe80 --- /dev/null +++ b/t/compose-non-role.t @@ -0,0 +1,14 @@ +use strictures 1; +use Test::More; +use Test::Fatal; + +$INC{'MyRole.pm'} = __FILE__; + +{ + package MyClass; + use Moo; + ::like(::exception { with 'MyRole'; }, qr/MyRole is not a Moo::Role/, + 'error when composing non-role package'); +} + +done_testing;