From: Shawn M Moore Date: Tue, 17 Jun 2008 03:38:38 +0000 (+0000) Subject: Test that "has" adds an attribute to the role X-Git-Tag: 0.19~304 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=05c74c222cb10b9c4478c0e790f08a00d9ca9048;p=gitmo%2FMouse.git Test that "has" adds an attribute to the role --- diff --git a/t/401-meta-role.t b/t/401-meta-role.t index 7fa345f..8816a8c 100644 --- a/t/401-meta-role.t +++ b/t/401-meta-role.t @@ -15,3 +15,15 @@ isa_ok(Role->meta, "Mouse::Meta::Role"); is(Role->meta->name, "Role"); +ok(!Role->meta->has_attribute('attr'), "Role doesn't have attr attribute yet"); + +do { + package Role; + use Mouse::Role; + + has 'attr'; + + no Mouse::Role; +}; + +ok(Role->meta->has_attribute('attr'), "Role has an attr now");