fix prereq list in README - it was ancient!
[gitmo/MooseX-Storage.git] / t / 011_basic_json_w_utf8.t
index b8d4c91..a5bd3d8 100644 (file)
@@ -1,24 +1,24 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
 use Test::More;
 
+use Test::Requires {
+    'Encode' => 0.01, # skip all if not installed
+    'JSON::Any' => 0.01,
+};
+
 BEGIN {
-    eval "use Encode";
-    plan skip_all => "Encode is required for this test" if $@;
-    eval "use JSON::Any";
-    plan skip_all => "JSON::Any is required for this test" if $@; 
     # NOTE:
-    # this is because JSON::XS is
+    # this is because JSON::XS (and Cpanel::JSON::XS) is
     # the only one which really gets
     # utf8 correct
     # - SL
     BEGIN {
-        $ENV{JSON_ANY_ORDER}  = qw(XS);
-        $ENV{JSON_ANY_CONFIG} = "utf8=1"; 
-    } 
+        $ENV{JSON_ANY_ORDER}  = 'XS CPANEL';
+        $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1";
+    }
+
     plan tests => 16;
     use_ok('MooseX::Storage');
 }