X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xt%2Fmoo-roles-into-moose-class.t;h=c22f406c679b7db0effbfab20ec7b481275dc256;hb=dcc862ca7849e996583c57c479d831f8eb1e7fd8;hp=ac17d30febc8272bd2cba3caf7075060a865c20e;hpb=167455a084389e2c70299e9e29f1ad249faa2c15;p=gitmo%2FMoo.git diff --git a/xt/moo-roles-into-moose-class.t b/xt/moo-roles-into-moose-class.t index ac17d30..c22f406 100644 --- a/xt/moo-roles-into-moose-class.t +++ b/xt/moo-roles-into-moose-class.t @@ -1,6 +1,7 @@ use strict; use warnings; use Test::More; +use Test::Fatal; { package Foo; @@ -43,6 +44,27 @@ use Test::More; /; } -ok 1; +{ + package Baw; + use Moo::Role; + has attr => ( + is => 'ro', + traits => ['Array'], + default => sub { [] }, + handles => { + push_attr => 'push', + }, + ); +} +{ + package Buh; + use Moose; + with 'Baw'; +} + +is exception { + Buh->new->push_attr(1); +}, undef, 'traits in role attributes are inflated properly'; + done_testing;