Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 300_immutable / 013_immutable_roundtrip.t
1 #!/usr/bin/perl
2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
5
6 use strict;
7 use warnings;
8
9 use Test::More;
10
11 use Test::Requires {
12     'Test::Output' => '0.01', # skip all if not installed
13 };
14
15 {
16     package Foo;
17     use Mouse;
18     __PACKAGE__->meta->make_immutable;
19 }
20
21 {
22     package Bar;
23     use Mouse;
24
25     extends 'Foo';
26
27     __PACKAGE__->meta->make_immutable;
28     __PACKAGE__->meta->make_mutable;
29
30
31     # This actually is testing for a bug in Mouse::Meta that cause
32     # Mouse::Meta::Method to spit out a warning when it
33     # shouldn't have done so. The bug was fixed in CMOP 0.75.
34     ::stderr_unlike(
35         sub { Bar->meta->make_immutable },
36         qr/Not inlining a constructor/,
37         'no warning that Bar may not have an inlined constructor'
38     );
39 }
40
41 done_testing;