Convert all tests to done_testing.
[gitmo/Moose.git] / t / 300_immutable / 005_multiple_demolish_inline.t
index 53b31a0..d30a9c8 100644 (file)
@@ -3,11 +3,10 @@
 use strict;
 use warnings;
 
-use Test::More tests => 2;
+use Test::More;
 use Test::Exception;
 
 
-
 {
     package Foo;
     use Moose;
@@ -32,6 +31,17 @@ lives_ok {
 } 'Bar->new()';
 
 lives_ok {
-    my $bar = Bar->new();
-    $bar->meta->make_immutable;
-} 'Bar->meta->make_immutable';
\ No newline at end of file
+    Bar->meta->make_immutable;
+} 'Bar->meta->make_immutable';
+
+is( Bar->meta->get_method('DESTROY')->package_name, 'Bar',
+    'Bar has a DESTROY method in the Bar class (not inherited)' );
+
+lives_ok {
+    Foo->meta->make_immutable;
+} 'Foo->meta->make_immutable';
+
+is( Foo->meta->get_method('DESTROY')->package_name, 'Foo',
+    'Foo has a DESTROY method in the Bar class (not inherited)' );
+
+done_testing;