sub with { confess "Mouse::Role does not currently support 'with'" }
-sub requires {}
+sub requires { confess "Mouse::Role does not currently support 'requires'" }
-sub excludes {}
+sub excludes { confess "Mouse::Role does not currently support 'excludes'" }
sub import {
strict->import;
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More tests => 12;
use Test::Exception;
lives_ok {
with 'Other::Role';
no Mouse::Role;
-} qr/Role does not currently support 'with'/;
+} qr/Mouse::Role does not currently support 'with'/;
-lives_ok {
+throws_ok {
package Role;
use Mouse::Role;
requires 'required';
+
+ no Mouse::Role;
+} qr/Mouse::Role does not currently support 'requires'/;
+
+throws_ok {
+ package Role;
+ use Mouse::Role;
+
excludes 'excluded';
no Mouse::Role;
-};
+} qr/Mouse::Role does not currently support 'excludes'/;
throws_ok {
package Role;