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=6986fd41cdfee75339ad498b9d9371cbe9674943;hpb=306290e864ac23e5f1692c8495b0c173081a1ebb;p=gitmo%2FMouse.git diff --git a/t/101-meta-attribute.t b/t/101-meta-attribute.t index 6986fd4..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 => 9; +use Test::More tests => 10; do { package Class; @@ -23,10 +23,11 @@ isa_ok($meta, 'Mouse::Meta::Class'); my $attr = $meta->get_attribute('pawn'); 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');