From: Dave Rolsky Date: Sun, 26 Sep 2010 15:14:11 +0000 (-0500) Subject: Turn this into a simpler TODO test X-Git-Tag: v0.18~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=87e80a25722a2578a2c2de9bfe1c4153d2ceae1d;p=gitmo%2FMooseX-ClassAttribute.git Turn this into a simpler TODO test --- diff --git a/t/08-role-composition.t b/t/08-role-composition.t index 6b99ed7..a3bb0e9 100644 --- a/t/08-role-composition.t +++ b/t/08-role-composition.t @@ -1,32 +1,37 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More; use Test::Exception; -lives_ok { - Bar->new->_connections; -} 'finds a class attribute under role composition'; +{ + package Role; + use Moose::Role; + use MooseX::ClassAttribute; -BEGIN { - -package Role; -use Moose::Role; -use MooseX::ClassAttribute; - -class_has '_connections' => ( - is => 'ro', - isa => 'HashRef', - default => sub { {} }, - ); + class_has 'CA' => ( + is => 'ro', + isa => 'HashRef', + default => sub { {} }, + ); +} -package Role2; -use Moose::Role; +{ + package Role2; + use Moose::Role; +} -package Bar; -use Moose; +{ + package Bar; + use Moose; -with ('Role2','Role'); + with( 'Role2', 'Role' ); +} +{ + local $TODO = 'Class attributes are lost during role composition'; + can_ok( 'Bar', 'CA', ); } + +done_testing();