From: Karen Etheridge Date: Thu, 29 Aug 2013 01:32:39 +0000 (-0700) Subject: make this test function properly when JSON backends aren't installed X-Git-Tag: v0.40~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Storage.git;a=commitdiff_plain;h=c2d52f94beb56939250944a12df15d7d90779866 make this test function properly when JSON backends aren't installed --- diff --git a/Changes b/Changes index ec0528b..b05c952 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ Revision history for {{$dist->name}} {{$NEXT}} * replaced last use of Best (held over since 2010!) to YAML::Any + * fixed another test making use of optional features 0.39 2013-07-26 17:02:26 PDT-0700 (Karen Etheridge) * re-release as stable (full working Dist::Zilla conversion) diff --git a/t/105_io_atomic_w_utf8.t b/t/105_io_atomic_w_utf8.t index 0347c63..386e8e5 100644 --- a/t/105_io_atomic_w_utf8.t +++ b/t/105_io_atomic_w_utf8.t @@ -6,24 +6,22 @@ use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir; +# NOTE: +# this is because JSON::XS (and Cpanel::JSON::XS) is +# the only one which really gets utf8 correct +# - SL +BEGIN { + $ENV{JSON_ANY_ORDER} = 'XS CPANEL'; + $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1"; +} + use Test::Requires { 'JSON::Any' => 0.01, # skip all if not installed 'IO::AtomicFile' => 0.01, }; -BEGIN { - # NOTE: - # this is because JSON::XS (and Cpanel::JSON::XS) is - # the only one which really gets - # utf8 correct - # - SL - BEGIN { - $ENV{JSON_ANY_ORDER} = 'XS CPANEL'; - $ENV{JSON_ANY_CONFIG} = "utf8=0,canonical=1"; - } - plan tests => 8; - use_ok('MooseX::Storage'); -} +plan tests => 8; +use_ok('MooseX::Storage'); use utf8;