X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100-meta-class.t;h=b90c6cac24820bd76636d2584282ff1783f1e238;hb=9b2c1c4edf716f870c325a2cf01aa05a17ef02d6;hp=8e3ee3106567845b34ecb8d88844688ab385581f;hpb=306290e864ac23e5f1692c8495b0c173081a1ebb;p=gitmo%2FMouse.git diff --git a/t/100-meta-class.t b/t/100-meta-class.t index 8e3ee31..b90c6ca 100644 --- a/t/100-meta-class.t +++ b/t/100-meta-class.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 14; do { package Class; @@ -25,6 +25,7 @@ is($meta, $meta2, "same metaclass instance"); can_ok($meta, 'name', 'get_attribute_map'); +ok($meta->has_attribute('pawn')); my $attr = $meta->get_attribute('pawn'); isa_ok($attr, 'Mouse::Meta::Attribute'); is($attr->name, 'pawn', 'got the correct attribute'); @@ -32,6 +33,8 @@ is($attr->name, 'pawn', 'got the correct attribute'); my $map = $meta->get_attribute_map; is_deeply($map, { pawn => $attr }, "attribute map"); +ok(!$meta->has_attribute('nonexistent_attribute')); + eval " package Class; use Mouse;