From: Hans Dieter Pearcey Date: Sat, 28 Mar 2009 06:20:42 +0000 (-0400) Subject: fix wrong JSON tests X-Git-Tag: 0.70~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=commitdiff_plain;h=8b01055612fcddfb78a16a40d698b687d8b07496 fix wrong JSON tests --- diff --git a/Changes b/Changes index 654cd33..d508841 100644 --- 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) diff --git a/t/catalyst-action-serialize-accept.t b/t/catalyst-action-serialize-accept.t index fcd3326..2e268e0 100644 --- a/t/catalyst-action-serialize-accept.t +++ b/t/catalyst-action-serialize-accept.t @@ -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'); diff --git a/t/json.t b/t/json.t index e3a13da..b601c64 100644 --- 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;