We were leaving the package name in the arg list
[gitmo/Moose.git] / t / 300_immutable / 010_constructor_is_not_moose.t
index 2a03b24..2852c55 100644 (file)
@@ -8,7 +8,7 @@ use Test::More;
 eval "use Test::Output";
 plan skip_all => "Test::Output is required for this test" if $@;
 
-plan tests => 5;
+plan tests => 6;
 
 {
     package NotMoose;
@@ -77,3 +77,28 @@ isnt(
         'no warning when inheriting from a class that has already made itself immutable'
     );
 }
+
+{
+    package My::Constructor;
+    use base 'Moose::Meta::Method::Constructor';
+}
+
+{
+    package CustomCons;
+    use Moose;
+
+    CustomCons->meta->make_immutable( constructor_class => 'My::Constructor' );
+}
+
+{
+    package Subclass;
+    use Moose;
+
+    extends 'CustomCons';
+
+    ::stderr_is(
+        sub { Subclass->meta->make_immutable },
+        q{},
+        'no warning when inheriting from a class that has already made itself immutable'
+    );
+}