tests
Stevan Little [Thu, 31 Jan 2008 18:31:52 +0000 (18:31 +0000)]
t/300_immutable/005_multiple_demolish_inline.t [new file with mode: 0644]

diff --git a/t/300_immutable/005_multiple_demolish_inline.t b/t/300_immutable/005_multiple_demolish_inline.t
new file mode 100644 (file)
index 0000000..4f543ce
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+use Test::Exception;
+
+BEGIN {
+    use_ok('Moose');
+}
+
+{
+    package Foo;
+    use Moose;
+
+    has 'foo' => (is => 'rw', isa => 'Int');
+
+    sub DEMOLISH { }
+}
+
+{
+    package Bar;
+    use Moose;
+
+    extends qw(Foo);
+    has 'bar' => (is => 'rw', isa => 'Int');
+
+    sub DEMOLISH { }
+}
+
+lives_ok {
+    Bar->new();
+} 'Bar->new()';
+
+lives_ok {
+    my $bar = Bar->new();
+    $bar->meta->make_immutable;
+} 'Bar->meta->make_immutable';
\ No newline at end of file