X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F073_make_mutable.t;fp=t%2F073_make_mutable.t;h=59d3e4b8b99cba51d25fd3abbba8388ac0bb457f;hb=241646a3d4649202bf4abdb6abe1b24c953f417f;hp=d15626ee5a9363a9fc7132fe84db58458b4baea1;hpb=7217a0ef377bf2429741e8ccf4ea36351944c150;p=gitmo%2FClass-MOP.git diff --git a/t/073_make_mutable.t b/t/073_make_mutable.t index d15626e..59d3e4b 100644 --- a/t/073_make_mutable.t +++ b/t/073_make_mutable.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 99; +use Test::More tests => 95; use Test::Exception; use Scalar::Util; @@ -49,7 +49,7 @@ use Class::MOP; ok(!$meta->is_mutable, '... our class is no longer mutable'); ok($meta->is_immutable, '... our class is now immutable'); ok(!$meta->make_immutable, '... make immutable now returns nothing'); - ok($meta->get_method_map->{new}, '... inlined constructor created'); + ok($meta->get_method('new'), '... inlined constructor created'); ok($meta->has_method('new'), '... inlined constructor created for sure'); is_deeply([ map { $_->name } $meta->_inlined_methods ], [ 'new' ], '... really, i mean it'); @@ -57,8 +57,8 @@ use Class::MOP; ok($meta->is_mutable, '... our class is mutable'); ok(!$meta->is_immutable, '... our class is not immutable'); ok(!$meta->make_mutable, '... make mutable now returns nothing'); - ok(!$meta->get_method_map->{new}, '... inlined constructor removed'); - ok(!$meta->has_method('new'), '... inlined constructor removed for sure'); + ok(!$meta->get_method('new'), '... inlined constructor created'); + ok(!$meta->has_method('new'), '... inlined constructor removed for sure'); my %new_keys = map { $_ => 1 } grep { !/^_/ } keys %$meta; is_deeply(\%orig_keys, \%new_keys, '... no extraneous hashkeys'); @@ -86,10 +86,10 @@ use Class::MOP; ok( $meta->$_ , "... ${_} works") for qw(get_meta_instance get_all_attributes - class_precedence_list get_method_map ); + class_precedence_list ); lives_ok {$meta->make_immutable; } '... changed Baz to be immutable again'; - ok($meta->get_method_map->{new}, '... inlined constructor recreated'); + ok($meta->get_method('new'), '... inlined constructor recreated'); } { @@ -115,7 +115,7 @@ use Class::MOP; ok( $meta->$_ , "... ${_} works") for qw(get_meta_instance get_all_attributes - class_precedence_list get_method_map ); + class_precedence_list ); } { @@ -175,7 +175,7 @@ use Class::MOP; ok( $meta->$_ , "... ${_} works") for qw(get_meta_instance get_all_attributes - class_precedence_list get_method_map ); + class_precedence_list ); }; @@ -208,7 +208,7 @@ use Class::MOP; ok( $meta->$_ , "... ${_} works") for qw(get_meta_instance get_all_attributes - class_precedence_list get_method_map ); + class_precedence_list ); } {