summaryrefslogtreecommitdiffstats
path: root/t/03-description.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-10-31 16:24:41 -0500
committerJesse Luehrs <doy@tozt.net>2010-10-31 16:24:41 -0500
commit01b68b64a3f85bdf4615d74d357a4e8735ead106 (patch)
tree84928d9da70adc3efb9a0a514c0962b53d66aede /t/03-description.t
parent53b0abc5127b2a28344d9c17caefefcbebbee11b (diff)
downloadeval-closure-01b68b64a3f85bdf4615d74d357a4e8735ead106.tar.gz
eval-closure-01b68b64a3f85bdf4615d74d357a4e8735ead106.zip
convert to Test::Fatal
Diffstat (limited to 't/03-description.t')
-rw-r--r--t/03-description.t20
1 files changed, 11 insertions, 9 deletions
diff --git a/t/03-description.t b/t/03-description.t
index 8f7d893..97f8372 100644
--- a/t/03-description.t
+++ b/t/03-description.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
use Eval::Closure;
@@ -17,10 +17,11 @@ SOURCE
source => $source,
);
- throws_ok {
- $code->();
- } qr/^foo at \(eval \d+\) line \d+\n/,
- "no location info if context isn't passed";
+ like(
+ exception { $code->() },
+ qr/^foo at \(eval \d+\) line \d+\n/,
+ "no location info if context isn't passed"
+ );
}
{
@@ -29,10 +30,11 @@ SOURCE
description => 'accessor foo (defined at Class.pm line 282)',
);
- throws_ok {
- $code->();
- } qr/^foo at accessor foo \(defined at Class\.pm line 282\) line 2\n/,
- "description is set";
+ like(
+ exception { $code->() },
+ qr/^foo at accessor foo \(defined at Class\.pm line 282\) line 2\n/,
+ "description is set"
+ );
}
done_testing;