From e11e714d5ceb9e4b47ced0e56730c95705f0bc9f Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Sun, 27 Jun 2010 16:50:16 -0700 Subject: Better diagnostics when the evals fail. --- t/01-basic.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' ); -- cgit v1.2.3