4 use Test::More tests => 10;
12 predicate => 'has_pawn',
13 clearer => 'clear_pawn',
14 default => sub { 10 },
20 my $meta = Class->meta;
21 isa_ok($meta, 'Mouse::Meta::Class');
23 my $attr = $meta->get_attribute('pawn');
24 isa_ok($attr, 'Mouse::Meta::Attribute');
26 can_ok($attr, qw(name associated_class predicate clearer));
27 is($attr->name, 'pawn', 'attribute name');
28 is($attr->associated_class, Class->meta, 'associated_class');
29 is($attr->predicate, 'has_pawn', 'predicate');
30 is($attr->clearer, 'clear_pawn', 'clearer');
31 ok(!$attr->is_lazy_build, "not lazy_build");
32 is(ref($attr->default), 'CODE', 'default is a coderef');
33 ok($attr->verify_against_type_constraint(1), 'verify_against_type_constraint works even without isa');