From: Dave Rolsky Date: Sat, 14 Mar 2009 19:57:03 +0000 (-0500) Subject: Make sure method map is updated after a method is removed X-Git-Tag: 0.78_01~31 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1c9bf10756e01420588de9fe37d737f66a8ce8bd;p=gitmo%2FClass-MOP.git Make sure method map is updated after a method is removed --- diff --git a/t/003_methods.t b/t/003_methods.t index b3dffb8..5088f50 100644 --- a/t/003_methods.t +++ b/t/003_methods.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 66; +use Test::More tests => 67; use Test::Exception; use Scalar::Util qw/reftype/; @@ -181,6 +181,7 @@ is_deeply( is($Foo->remove_method('foo')->body, $foo, '... removed the foo method'); ok(!$Foo->has_method('foo'), '... !Foo->has_method(foo) we just removed it'); +ok(!$Foo->get_method_map->{foo}, 'foo is not in the method map'); dies_ok { Foo->foo } '... cannot call Foo->foo because it is not there'; is_deeply(