Import Moose/t/100_bugs
[gitmo/Mouse.git] / t / 100_bugs / 016_inheriting_from_roles.t
diff --git a/t/100_bugs/016_inheriting_from_roles.t b/t/100_bugs/016_inheriting_from_roles.t
new file mode 100644 (file)
index 0000000..269efcb
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+use Test::Exception;
+
+
+
+{
+    package My::Role;
+    use Mouse::Role;
+}
+{
+    package My::Class;
+    use Mouse;
+
+    ::throws_ok {
+        extends 'My::Role';
+    } qr/You cannot inherit from a Mouse Role \(My\:\:Role\)/,
+    '... this croaks correctly';
+}