Improve text of ro/wo violation exceptions
[p5sagit/Class-Accessor-Grouped.git] / t / accessors_ro.t
index 7b385a2..ca372a6 100644 (file)
@@ -80,7 +80,7 @@ for my $name (sort keys %$test_accessors) {
 
   my $ro_regex = $test_accessors->{$name}{is_xs}
     ? qr/Usage\:.+$name.*\(self\)/
-    : qr/cannot alter the value of '\Q$field\E'/
+    : qr/$name(:?_accessor)?\Q' cannot alter its value (read-only attribute of class AccessorGroupsRO)/
   ;
 
   {