reader => 'documentation',
predicate => 'has_documentation',
));
+__PACKAGE__->meta->add_attribute('traits' => (
+ reader => 'applied_traits',
+ predicate => 'has_applied_traits',
+));
# NOTE:
# we need to have a ->does method in here to
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 9;
use Test::Exception;
use Test::Moose;
can_ok($c, 'baz');
is($c->baz, 100, '... got the right value for baz');
-does_ok($c->meta->get_attribute('bar'), 'My::Attribute::Trait');
+my $bar_attr = $c->meta->get_attribute('bar');
+does_ok($bar_attr, 'My::Attribute::Trait');
+is_deeply($bar_attr->applied_traits, [qw/My::Attribute::Trait/], '... got the applied traits');
ok(!$c->meta->get_attribute('gorch')->does('My::Attribute::Trait'), '... gorch doesnt do the trait');