X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F300_overloaded.t;h=c1710a495cfed342d3473f2994dbf33a08d8643b;hb=9d3c60f5f35a8d28951049e8daccd9f67c22f9aa;hp=d17593bf165872c8bbb1720c30237d39233ed5a2;hpb=049541bdd8fe53d81ca4e0bc8cea4d5a79210ada;p=gitmo%2FMooseX-Storage.git diff --git a/t/300_overloaded.t b/t/300_overloaded.t index d17593b..c1710a4 100644 --- a/t/300_overloaded.t +++ b/t/300_overloaded.t @@ -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;