From: Michael G. Schwern Date: Sun, 27 Jun 2010 23:50:16 +0000 (-0700) Subject: Better diagnostics when the evals fail. X-Git-Tag: 0.05~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e11e714d5ceb9e4b47ced0e56730c95705f0bc9f;p=gitmo%2FMooseX-AlwaysCoerce.git Better diagnostics when the evals fail. --- diff --git a/t/01-basic.t b/t/01-basic.t index b3643e5..1f7f3b1 100644 --- a/t/01-basic.t +++ b/t/01-basic.t @@ -25,10 +25,10 @@ use Test::More tests => 5; ok( (my $instance = MyClass->new), 'instance' ); eval { $instance->foo('bar') }; -ok( (!$@), 'attribute coercion ran' ); +is $@, "", 'attribute coercion ran'; eval { $instance->bar('baz') }; -ok( (!$@), 'class attribute coercion ran' ); +is $@, "", 'class attribute coercion ran'; eval { $instance->baz('quux') }; ok( $@, 'class attribute coercion did not run with coerce => 0' );