test for composing non-role
Graham Knop [Fri, 24 May 2013 17:06:35 +0000 (13:06 -0400)]
t/compose-non-role.t [new file with mode: 0644]

diff --git a/t/compose-non-role.t b/t/compose-non-role.t
new file mode 100644 (file)
index 0000000..413fe80
--- /dev/null
@@ -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;