fix wrong JSON tests
Hans Dieter Pearcey [Sat, 28 Mar 2009 06:20:42 +0000 (02:20 -0400)]
Changes
t/catalyst-action-serialize-accept.t
t/json.t

diff --git a/Changes b/Changes
index 654cd33..d508841 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+???
+  Tests that use JSON were either not checking for the version or checking in a
+  way that was a syntax error. (hdp)
+
 Thu Mar 26 14:16:03 PDT 2009 (hdp) - Release 0.69
   Fix RT#32342, deprecated config loses default map (hdp)
   Fix broken insertion of Catalyst::Request::REST for Action::REST (jshirley)
index fcd3326..2e268e0 100644 (file)
@@ -36,7 +36,7 @@ EOH
 }
 
 SKIP: {
-    eval 'require JSON 2.12;';
+    eval 'use JSON 2.12;';
     skip "can't test application/json without JSON support", 3 if $@;
     my $json = JSON->new;
     my $at = Test::Rest->new('content_type' => 'text/doesnt-exist');
index e3a13da..b601c64 100644 (file)
--- a/t/json.t
+++ b/t/json.t
@@ -6,8 +6,8 @@ use FindBin;
 use lib ("$FindBin::Bin/lib", "$FindBin::Bin/../lib");
 use Test::Rest;
 
-eval 'require JSON';
-plan skip_all => 'Install JSON to run this test' if ($@);
+eval 'use JSON 2.12';
+plan skip_all => 'Install JSON 2.12 or later to run this test' if ($@);
 
 plan tests => 9;