From: Matt S Trout Date: Tue, 25 Oct 2011 01:56:53 +0000 (+0000) Subject: adjust tests to only test for truth of make_immutable return X-Git-Tag: 2.0302~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b20483ff00e00f5215a478e194afad3a2a2a2ddc;p=gitmo%2FMoose.git adjust tests to only test for truth of make_immutable return --- diff --git a/t/cmop/immutable_metaclass.t b/t/cmop/immutable_metaclass.t index 190b61c..e674f34 100644 --- a/t/cmop/immutable_metaclass.t +++ b/t/cmop/immutable_metaclass.t @@ -45,10 +45,10 @@ use Class::MOP; 'immutable_options is empty before a class is made_immutable' ); - is( $meta->make_immutable, $meta, 'make_immutable returns $self' ); + ok( $meta->make_immutable, 'make_immutable returns true' ); my $line = __LINE__ - 1; - is( $meta->make_immutable, $meta, 'make_immutable returns $self again' ); + ok( $meta->make_immutable, 'make_immutable still returns true' ); my $immutable_metaclass = $meta->_immutable_metaclass->meta; @@ -147,7 +147,7 @@ use Class::MOP; $meta->make_immutable(); }, undef, '... changed Bar to be immutable' ); - is( $meta->make_immutable, $meta, '... make immutable returns $meta' ); + ok( $meta->make_immutable, '... make immutable returns true' ); ok( !$meta->is_mutable, '... our class is no longer mutable' ); ok( $meta->is_immutable, '... our class is now immutable' ); @@ -211,7 +211,7 @@ use Class::MOP; $meta->make_immutable(); }, undef, '... changed Baz to be immutable' ); - is( $meta->make_immutable, $meta, '... make immutable returns $meta' ); + ok( $meta->make_immutable, '... make immutable returns true' ); ok( !$meta->is_mutable, '... our class is no longer mutable' ); ok( $meta->is_immutable, '... our class is now immutable' ); diff --git a/t/cmop/make_mutable.t b/t/cmop/make_mutable.t index a4c1a96..cf30738 100644 --- a/t/cmop/make_mutable.t +++ b/t/cmop/make_mutable.t @@ -48,7 +48,7 @@ use Class::MOP; is( exception {$meta->make_immutable; }, undef, '... changed Baz to be immutable' ); ok(!$meta->is_mutable, '... our class is no longer mutable'); ok($meta->is_immutable, '... our class is now immutable'); - is($meta->make_immutable, $meta, '... make immutable returns $meta'); + ok($meta->make_immutable, '... make immutable returns true'); 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'); @@ -136,7 +136,7 @@ use Class::MOP; }, undef, '... changed class to be immutable' ); ok(!$meta->is_mutable, '... our class is no longer mutable'); ok($meta->is_immutable, '... our class is now immutable'); - is($meta->make_immutable, $meta, '... make immutable returns $meta'); + ok($meta->make_immutable, '... make immutable returns true'); is( exception { $meta->make_mutable }, undef, '... changed Baz to be mutable' ); ok($meta->is_mutable, '... our class is mutable');