Unconditionally depend on Test::Output; dropping Test::Warn
[gitmo/Moose.git] / t / 300_immutable / 013_immutable_roundtrip.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 1;
7 use Test::Output;
8
9 {
10     package Foo;
11     use Moose;
12     __PACKAGE__->meta->make_immutable;
13 }
14
15 {
16     package Bar;
17     use Moose;
18
19     extends 'Foo';
20
21     __PACKAGE__->meta->make_immutable;
22     __PACKAGE__->meta->make_mutable;
23
24
25     # This actually is testing for a bug in Class::MOP that cause
26     # Moose::Meta::Method::Constructor to spit out a warning when it
27     # shouldn't have done so. The bug was fixed in CMOP 0.75.
28     ::stderr_unlike(
29         sub { Bar->meta->make_immutable },
30         qr/Not inlining a constructor/,
31         'no warning that Bar may not have an inlined constructor'
32     );
33 }
34