X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F030_with_checksum.t;h=18934f894c445b4059d3ff51e96d9d27140c7b16;hb=81a84db6ebe5ec540d0035fc6d1104cc49c81e25;hp=98925004a6340c2ec61ee744c0f344bb30ccc606;hpb=b5f363acfcf077778dd4f3b59460a0cbb9e51400;p=gitmo%2FMooseX-Storage.git diff --git a/t/030_with_checksum.t b/t/030_with_checksum.t index 9892500..18934f8 100644 --- a/t/030_with_checksum.t +++ b/t/030_with_checksum.t @@ -1,23 +1,22 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; -use Test::Exception; +use Test::Fatal; use Test::Deep; +use Test::Requires { + 'Digest' => 0.01, # skip all if not installed + 'Digest::SHA' => 0.00, + 'JSON::Any' => 0.01, +}; + BEGIN { - eval "use Digest; use Digest::SHA1"; - plan skip_all => "Digest and Digest::SHA1 is required for this test" if $@; - eval "use JSON::Any"; - plan skip_all => "JSON::Any is required for this test" if $@; plan tests => 26; use_ok('MooseX::Storage'); } { - package Foo; use Moose; use MooseX::Storage; @@ -65,9 +64,9 @@ BEGIN { ); my $foo2; - lives_ok { + is( exception { $foo2 = Foo->unpack($packed); - } '... unpacked okay'; + }, undef, '... unpacked okay'); isa_ok($foo2, 'Foo'); cmp_deeply(