Don't call ->does_role on meta object until we know it has that method
[gitmo/moose-presentations.git] / moose-class / exercises / t / lib / MooseClass / Tests.pm
index 06849e0..c3a333a 100644 (file)
@@ -328,7 +328,8 @@ sub tests06 {
     }
 
     ok(
-        $history_attr->meta()
+        $history_attr->meta()->can('does_role')
+            && $history_attr->meta()
             ->does_role('Moose::Meta::Attribute::Native::Trait::Array'),
         'BankAccount history attribute uses native delegation to an array ref'
     );