Import Moose/t/010_basics/*.t
[gitmo/Mouse.git] / t / 010_basics / failing / 021-instance-new.t
diff --git a/t/010_basics/failing/021-instance-new.t b/t/010_basics/failing/021-instance-new.t
new file mode 100755 (executable)
index 0000000..1c7d84d
--- /dev/null
@@ -0,0 +1,25 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Exception;
+BEGIN {
+    eval "use Test::Output;";
+    plan skip_all => "Test::Output is required for this test" if $@;
+    plan tests => 2;
+}
+
+{
+    package Foo;
+    use Mouse;
+}
+
+{
+    my $foo = Foo->new();
+    stderr_like { $foo->new() }
+    qr/\QCalling new() on an instance is deprecated/,
+        '$object->new() is deprecated';
+
+    Foo->meta->make_immutable, redo
+        if Foo->meta->is_mutable;
+}