Add a DB::sub test to xt/
[gitmo/Mouse.git] / t / 010_basics / failing / 021-instance-new.t
CommitLineData
60ad2cb7 1use strict;
2use warnings;
3
4use Test::More;
5use Test::Exception;
6BEGIN {
7 eval "use Test::Output;";
8 plan skip_all => "Test::Output is required for this test" if $@;
9 plan tests => 2;
10}
11
12{
13 package Foo;
14 use Mouse;
15}
16
17{
18 my $foo = Foo->new();
19 stderr_like { $foo->new() }
20 qr/\QCalling new() on an instance is deprecated/,
21 '$object->new() is deprecated';
22
23 Foo->meta->make_immutable, redo
24 if Foo->meta->is_mutable;
25}