From: Rafael Kitover Date: Tue, 9 Jun 2009 23:09:49 +0000 (-0700) Subject: added TODO test for +attribute in a role that composes over another role X-Git-Tag: 0.82~18^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=55e5afd5f1328171db6e2eb8025680be6b3b65a6;p=gitmo%2FMoose.git added TODO test for +attribute in a role that composes over another role --- diff --git a/t/100_bugs/027_compose_over_attribute.t b/t/100_bugs/027_compose_over_attribute.t new file mode 100644 index 0000000..215bd8f --- /dev/null +++ b/t/100_bugs/027_compose_over_attribute.t @@ -0,0 +1,31 @@ +use strict; +use warnings; + +use Test::More tests => 2; +use Test::Exception; + +{ + package BaseRole; + use Moose::Role; + has foo => (is => 'ro'); +} + +TODO: { + local $TODO = '+attributes in roles that compose over other roles'; + + eval q{ + package ChildRole; + use Moose::Role; + with 'BaseRole'; + has '+foo' => (default => 'bar'); + + package AClass; + use Moose; + with 'ChildRole'; + }; + + ok( (not $@), '+attribute created in child role' ); + + is eval{ AClass->new->foo }, 'bar', + '+attribute in child role works correctly'; +}