convert all uses of Test::Exception to Test::Fatal.
[gitmo/MooseX-Storage.git] / t / 300_overloaded.t
index d17593b..c1710a4 100644 (file)
@@ -1,14 +1,11 @@
 use strict;
 use warnings;
 use Test::More;
-use Test::Exception;
+use Test::Fatal;
 
-BEGIN {
-    eval { require JSON::Any } or do {
-        plan skip_all => "JSON::Any is required for this test";
-        exit 0;
-    }
-}
+use Test::Requires {
+    'JSON::Any' => 0.01, # skip all if not installed
+};
 
 {
     package Thing;
@@ -30,9 +27,9 @@ BEGIN {
 
 my $i = Thing->new(foo => "bar");
 
-lives_ok {
+is( exception {
     $i . "";
-} 'Can stringify without deep recursion';
+}, undef, 'Can stringify without deep recursion');
 
 done_testing;