8 # We just want the class definitions in here.
12 HasClassAttribute->meta()->has_class_attribute('ObjectCount'),
13 q{has_class_attribute('ObjectCount') returns true}
17 HasClassAttribute->meta()->get_class_attribute('ObjectCount')->meta()
18 ->does_role('MooseX::ClassAttribute::Trait::Attribute'),
19 'get_class_attribute_list returns an object which does the MooseX::ClassAttribute::Trait::Attribute role'
22 my @ca = qw( Delegatee
36 [ sort HasClassAttribute->meta()->get_class_attribute_list() ],
38 'HasClassAttribute get_class_attribute_list gets all class attributes'
43 sort map { $_->name() }
44 HasClassAttribute->meta()->get_all_attributes()
47 'HasClassAttribute get_all_attributes only finds size attribute'
52 sort map { $_->name() }
53 HasClassAttribute->meta()->get_all_class_attributes()
56 'HasClassAttribute get_all_class_attributes gets all class attributes'
60 [ sort keys %{ HasClassAttribute->meta()->get_class_attribute_map() } ],
62 'HasClassAttribute get_class_attribute_map gets all class attributes'
66 [ sort map { $_->name() } Child->meta()->get_all_class_attributes() ],
67 [ sort ( @ca, 'YetAnotherAttribute' ) ],
68 'Child get_class_attribute_map gets all class attributes'
72 !Child->meta()->has_class_attribute('ObjectCount'),
73 q{has_class_attribute('ObjectCount') returns false for Child}
77 Child->meta()->has_class_attribute('YetAnotherAttribute'),
78 q{has_class_attribute('YetAnotherAttribute') returns true for Child}
82 Child->can('YetAnotherAttribute'),
83 'Child has accessor for YetAnotherAttribute'
87 Child->meta()->has_class_attribute_value('YetAnotherAttribute'),
88 'Child has class attribute value for YetAnotherAttribute'
91 Child->meta()->remove_class_attribute('YetAnotherAttribute');
94 !Child->meta()->has_class_attribute('YetAnotherAttribute'),
95 q{... has_class_attribute('YetAnotherAttribute') returns false after remove_class_attribute}
99 !Child->can('YetAnotherAttribute'),
100 'accessor for YetAnotherAttribute has been removed'
104 !Child->meta()->has_class_attribute_value('YetAnotherAttribute'),
105 'Child does not have a class attribute value for YetAnotherAttribute'