X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F101-meta-attribute.t;h=8143274d3628b62a576db5dadb2bf637181d7cdd;hb=c9313657717f78bd96f0325c6aa1c93d0b0d41a5;hp=ecb1eb123bde3c1bdb475897dfbe5a3ad5af5a85;hpb=fb706f5c1e60ddafe873717be7209066d47b8998;p=gitmo%2FMouse.git diff --git a/t/101-meta-attribute.t b/t/101-meta-attribute.t index ecb1eb1..8143274 100644 --- a/t/101-meta-attribute.t +++ b/t/101-meta-attribute.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 10; do { package Class; @@ -18,15 +18,16 @@ do { }; my $meta = Class->meta; -isa_ok($meta, 'Mouse::Class'); +isa_ok($meta, 'Mouse::Meta::Class'); my $attr = $meta->get_attribute('pawn'); -isa_ok($attr, 'Mouse::Attribute'); +isa_ok($attr, 'Mouse::Meta::Attribute'); -can_ok($attr, qw(name class predicate clearer)); +can_ok($attr, qw(name associated_class predicate clearer)); is($attr->name, 'pawn', 'attribute name'); -is($attr->class, 'Class', 'attached class'); +is($attr->associated_class, Class->meta, 'associated_class'); is($attr->predicate, 'has_pawn', 'predicate'); is($attr->clearer, 'clear_pawn', 'clearer'); +ok(!$attr->is_lazy_build, "not lazy_build"); is(ref($attr->default), 'CODE', 'default is a coderef'); -ok($attr->verify_type_constraint(1), 'verify_type_constraint works even without isa'); +ok($attr->verify_against_type_constraint(1), 'verify_against_type_constraint works even without isa');