From: Graham Knop Date: Fri, 24 May 2013 17:06:35 +0000 (-0400) Subject: test for composing non-role X-Git-Tag: v1.003000~81 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2afd0396de074dd5dbea1e4eaeedbf6fc070743;p=gitmo%2FMoo.git test for composing non-role --- 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;