diff options
author | Michael G. Schwern <schwern@pobox.com> | 2010-06-27 16:50:16 -0700 |
---|---|---|
committer | Rafael Kitover <rkitover@cpan.org> | 2010-07-12 19:49:15 -0400 |
commit | e11e714d5ceb9e4b47ced0e56730c95705f0bc9f (patch) | |
tree | a19057ff7b0905fc944a28dfa5f6ec37b8b122ea | |
parent | 538d9d4ec7ec0076a1c11ce291fb549564838c28 (diff) | |
download | mx-alwayscoerce-e11e714d5ceb9e4b47ced0e56730c95705f0bc9f.tar.gz mx-alwayscoerce-e11e714d5ceb9e4b47ced0e56730c95705f0bc9f.zip |
Better diagnostics when the evals fail.
-rw-r--r-- | t/01-basic.t | 4 |
1 files 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' ); |