From: Graham Knop Date: Wed, 17 Apr 2013 07:30:34 +0000 (-0400) Subject: failing test for lazy builder re-calling when isa fails X-Git-Tag: v1.002000~27 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5801a52da2d3811e919d6785b6952ce5d95ccb90;hp=f9428f9c6a4bace160f1886150c080c0ebe24752;p=gitmo%2FMoo.git failing test for lazy builder re-calling when isa fails --- diff --git a/t/accessor-isa.t b/t/accessor-isa.t index 2ce945a..01a005c 100644 --- a/t/accessor-isa.t +++ b/t/accessor-isa.t @@ -103,14 +103,21 @@ my $lt3; $lt3 = 4; +my $lazyfoo = LazyFoo->new; like( - exception { LazyFoo->new->less_than_three }, + exception { $lazyfoo->less_than_three }, qr/isa check for "less_than_three" failed: 4 is not less than three/, "exception thrown on bad builder return value (LazyFoo)" ); $lt3 = 2; +is( + exception { $lazyfoo->less_than_three }, + undef, + 'Corrected builder value on existing object returned ok' +); + is(LazyFoo->new->less_than_three, 2, 'Correct builder value returned ok'); done_testing;