X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F013_add_attribute_alternate.t;h=ca70fe23449d619a6e5a75fb531f3c0a98d52eeb;hb=77a143bafdd524b01eb35af7d47c2a1d5554b5e2;hp=03cd2df75a23be18f1ac2995652d19d5615d0d9d;hpb=aa448b163f4882fc3e4b92a1c1f22e3c9ad9f933;p=gitmo%2FClass-MOP.git diff --git a/t/013_add_attribute_alternate.t b/t/013_add_attribute_alternate.t index 03cd2df..ca70fe2 100644 --- a/t/013_add_attribute_alternate.t +++ b/t/013_add_attribute_alternate.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 27; +use Test::More tests => 28; use Test::Exception; BEGIN { @@ -73,7 +73,9 @@ is($point->y, 42, '... the $.y attribute was set properly with the accessor'); is($point->x, 2, '... the $.x attribute was initialized correctly through the metaobject'); -$point->x(42); +dies_ok { + $point->x(42); +} '... cannot write to a read-only accessor'; is($point->x, 2, '... the $.x attribute was not altered'); $point->clear();