no Moo and no Moo::Role
[gitmo/Moo.git] / t / no-moo.t
index c857ef4..58d9297 100644 (file)
@@ -13,7 +13,22 @@ use Test::More;
   no Moo;
 }
 
+{
+  package Roller;
+
+  use Moo::Role;
+
+  no warnings 'redefine';
+
+  sub with { "with!" }
+
+  no Moo::Role;
+}
+
 ok(!Spoon->can('extends'), 'extends cleaned');
 is(Spoon->has, "has!", 'has left alone');
 
+ok(!Roller->can('has'), 'has cleaned');
+is(Roller->with, "with!", 'with left alone');
+
 done_testing;