this is a shorter way of specifying the gitmo repository properly
[gitmo/MooseX-Storage.git] / t / 012_param_json.t
index e694e1b..b855ef1 100644 (file)
@@ -1,18 +1,17 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
 use Test::More;
+use Test::Deep;
 
-BEGIN {        
-    local $@;
-    plan skip_all => "MooseX::Storage::Format::JSONpm required for this test"
-        unless eval "require MooseX::Storage::Format::JSONpm; 1";
-}
+use Test::Requires {
+    'MooseX::Storage::Format::JSONpm' => 0.01, # skip all if not installed
+};
 
-plan tests => 6;
-use_ok('MooseX::Storage');
+BEGIN {
+    plan tests => 6;
+    use_ok('MooseX::Storage');
+}
 
 {
     package Foo;
@@ -64,7 +63,7 @@ for my $jsonpm (
 
     my $json = eval { Bar->new(x => 10, y => 20)->freeze({ format => $p }) };
 
-    is_deeply(
+    cmp_deeply(
         JSON->new->decode($json),
         {
             '__CLASS__' => 'Bar-0.01',