copyright date changes on Class::MOP
[gitmo/Class-MOP.git] / t / 013_add_attribute_alternate.t
index 03cd2df..ca70fe2 100644 (file)
@@ -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();