Switch from JSON to JSON::MaybeXS to get a better choice of JSON parsers.
[catagits/Catalyst-Action-REST.git] / t / json.t
index 35d6059..7c8cc03 100644 (file)
--- a/t/json.t
+++ b/t/json.t
@@ -2,16 +2,12 @@ use strict;
 use warnings;
 use Test::More;
 use FindBin;
+use Test::Requires qw(JSON::MaybeXS);
 
 use lib ("$FindBin::Bin/lib", "$FindBin::Bin/../lib");
 use Test::Rest;
 use utf8;
 
-eval 'use JSON 2.12';
-plan skip_all => 'Install JSON 2.12 or later to run this test' if ($@);
-
-plan tests => 11;
-
 use_ok 'Catalyst::Test', 'Test::Serialize';
 
 my $json = JSON->new->utf8;
@@ -47,3 +43,5 @@ for ('text/x-json', 'application/json') {
 }
 
 1;
+
+done_testing;