add todo test for metaclass compat with immutable classes (dougdude)
Jesse Luehrs [Sat, 5 Jun 2010 20:47:37 +0000 (15:47 -0500)]
t/600_todo_tests/007_immutable_metaclass_compat.t [new file with mode: 0755]

diff --git a/t/600_todo_tests/007_immutable_metaclass_compat.t b/t/600_todo_tests/007_immutable_metaclass_compat.t
new file mode 100755 (executable)
index 0000000..a1e8e09
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+{
+    package Foo::Base::Meta::Trait;
+    use Moose::Role;
+}
+
+{
+    package Foo::Base;
+    use Moose;
+    Moose::Util::MetaRole::apply_metaroles(
+        for             => __PACKAGE__,
+        class_metaroles => { constructor => ['Foo::Base::Meta::Trait'] },
+    );
+    __PACKAGE__->meta->make_immutable;
+}
+
+{
+    package Foo::Meta::Trait;
+    use Moose::Role;
+}
+
+{
+    package Foo;
+    use Moose;
+    Moose::Util::MetaRole::apply_metaroles(
+        for             => __PACKAGE__,
+        class_metaroles => { constructor => ['Foo::Meta::Trait'] }
+    );
+    ::ok(!Foo->meta->is_immutable);
+    extends 'Foo::Base';
+    { our $TODO; local $TODO = "inheriting makes this immutable";
+    ::ok(!Foo->meta->is_immutable);
+    }
+}
+
+done_testing;