X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100_collection_with_roles.t;h=164665dbb36d5bed00eff7e0b890aa1aff464030;hb=2a6837a2c705ec26b8dad7f49c2342f7c220cedb;hp=025e5c65caae969b28ecaaf2b9769df9eedf82eb;hpb=92d18d6e049f5dd6b1d3051fa9b1d758d6701707;p=gitmo%2FMooseX-AttributeHelpers.git diff --git a/t/100_collection_with_roles.t b/t/100_collection_with_roles.t index 025e5c6..164665d 100644 --- a/t/100_collection_with_roles.t +++ b/t/100_collection_with_roles.t @@ -3,15 +3,12 @@ use strict; use warnings; -use Test::More no_plan => 1; +use Test::More tests => 29; BEGIN { use_ok('MooseX::AttributeHelpers'); } -## convert this to a test ... -## code by Robert Boone - package Subject; use Moose::Role; @@ -20,7 +17,7 @@ use MooseX::AttributeHelpers; has observers => ( metaclass => 'Collection::Array', is => 'ro', - isa => 'ArrayRef', + isa => 'ArrayRef[Observer]', auto_deref => 1, default => sub { [] }, provides => { 'push' => 'add_observer', count => 'count_observers' } @@ -39,9 +36,7 @@ package Observer; use Moose::Role; -sub update { - die 'Forgot to implement' . "\n"; -} +requires 'update'; ###############################################################################