From: Dave Rolsky Date: Wed, 14 Jul 2010 18:40:20 +0000 (-0500) Subject: Test that coerce errors come out for each attr, not just once per package defining... X-Git-Tag: 1.09~32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f8991ed7109bcd902966f7a04b16e3b25bccc20;p=gitmo%2FMoose.git Test that coerce errors come out for each attr, not just once per package defining the attrs --- diff --git a/t/020_attributes/034_bad_coerce.t b/t/020_attributes/034_bad_coerce.t index b85c171..f520052 100644 --- a/t/020_attributes/034_bad_coerce.t +++ b/t/020_attributes/034_bad_coerce.t @@ -20,6 +20,15 @@ BEGIN { } qr/\QYou cannot coerce an attribute (foo) unless its type (Str) has a coercion/, 'Cannot coerce unless the type has a coercion'; + + ::stderr_like{ has bar => ( + is => 'ro', + isa => 'Str', + coerce => 1, + ); + } + qr/\QYou cannot coerce an attribute (bar) unless its type (Str) has a coercion/, + 'Cannot coerce unless the type has a coercion - different attribute'; } done_testing;