X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F007-attributes.t;h=ae538e6bf487f963980107a1254909963ceb58b9;hb=8cbcbb47d0f02077d07873c553494a884d9c085f;hp=4edd2d0f156c5e7631f26a6338a1f23e672617de;hpb=a2096df637b33d3794ee12835a24ea8fd2acb978;p=gitmo%2FMouse.git diff --git a/t/007-attributes.t b/t/007-attributes.t index 4edd2d0..ae538e6 100644 --- a/t/007-attributes.t +++ b/t/007-attributes.t @@ -1,9 +1,12 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 15; +use Test::More tests => 18; use Test::Exception; +use lib 't/lib'; +use Test::Mouse; + do { package Class; use Mouse; @@ -30,6 +33,10 @@ do { ok(!Class->can('x'), "No accessor is injected if 'is' has no value"); can_ok('Class', 'y', 'z'); +has_attribute_ok 'Class', 'x'; +has_attribute_ok 'Class', 'y'; +has_attribute_ok 'Class', 'z'; + my $object = Class->new; ok(!$object->can('x'), "No accessor is injected if 'is' has no value");