adding in the new junk to this
[gitmo/MooseX-AttributeHelpers.git] / t / 100_collection_with_roles.t
index 025e5c6..164665d 100644 (file)
@@ -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';
 
 ###############################################################################