added TODO test for +attribute in a role that composes over another role
[gitmo/Moose.git] / t / 100_bugs / 027_compose_over_attribute.t
1 use strict;
2 use warnings;
3
4 use Test::More tests => 2;
5 use Test::Exception;
6
7 {
8     package BaseRole;
9     use Moose::Role;
10     has foo => (is => 'ro');
11 }
12
13 TODO: {
14     local $TODO = '+attributes in roles that compose over other roles';
15
16     eval q{
17         package ChildRole;
18         use Moose::Role;
19         with 'BaseRole';
20         has '+foo' => (default => 'bar');
21
22         package AClass;
23         use Moose;
24         with 'ChildRole';
25     };
26
27     ok( (not $@), '+attribute created in child role' );
28
29     is eval{ AClass->new->foo }, 'bar',
30         '+attribute in child role works correctly';
31 }