From: Shawn M Moore Date: Fri, 15 Jun 2012 18:24:09 +0000 (-0500) Subject: diag error for debugging when test fail X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d84a4840708dbce4846719591922a84811ad8492;p=gitmo%2FMoose.git diag error for debugging when test fail --- diff --git a/t/metaclasses/custom_error_class.t b/t/metaclasses/custom_error_class.t index bf02251..d05e1e3 100644 --- a/t/metaclasses/custom_error_class.t +++ b/t/metaclasses/custom_error_class.t @@ -97,7 +97,7 @@ use Test::Requires { isa_ok( $error, 'My::Exception', 'got exception object (immutable class)' - ); + ) or diag $error; is( $error->message, 'Attribute (test1) is required', 'got the right message (immutable class)' @@ -117,7 +117,10 @@ use Test::Requires { }; my $error = $@; - isa_ok( $error, 'My::Exception', 'got exception object (mutable class)' ); + isa_ok( + $error, 'My::Exception', + 'got exception object (mutable class)' + ) or diag $error; is( $error->message, 'Attribute (test1) is required', 'got the right message (mutable class)'