oops, need to handle the "can't reinitialize" case here
[gitmo/Moose.git] / t / 050_metaclasses / 015_metarole.t
index 6d80c50..b961bb1 100644 (file)
@@ -98,6 +98,10 @@ use Moose::Util::MetaRole;
     My::Class->meta()->add_after_method_modifier( 'bar' => sub { 'bar' } );
     is( My::Class->meta()->get_method('bar')->foo(), 10,
         '... call foo() on a wrapped method metaclass object' );
+    # so that it doesn't break on reinitialization, since it's a
+    # Class::MOP::Method::Wrapped object, which isn't a Moose::Meta::Method
+    # object. Someday we'll fix this...
+    My::Class->meta()->remove_method('bar');
 }
 
 {