X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F52-json.t;h=8bc5cc90ec30a841e5a1fbb7e978265350536da3;hp=555e74e3fc1eb4e2ff27a0c5cd50439200ba5cf4;hb=a047d247f05d33042434a5a4fbc17046c435ad71;hpb=67a1cd509bfc3f77a4fcaf42710de01597987bb0 diff --git a/t/52-json.t b/t/52-json.t index 555e74e..8bc5cc9 100644 --- a/t/52-json.t +++ b/t/52-json.t @@ -5,7 +5,7 @@ use Test::More; use Config::Any; use Config::Any::JSON; -if ( !Config::Any::JSON->is_supported ) { +if ( !Config::Any::JSON->is_supported && !$ENV{RELEASE_TESTING} ) { plan skip_all => 'JSON format not supported'; } else { @@ -23,8 +23,8 @@ else { my $file = 't/invalid/conf.json'; my $config = eval { Config::Any::JSON->load( $file ) }; - ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + is $config, undef, 'config load failed'; + isnt $@, '', 'error thrown'; } # parse error generated on invalid config @@ -32,6 +32,6 @@ else { my $file = 't/invalid/conf.json'; my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) }; - ok( !$config, 'config load failed' ); - ok( $@, "error thrown ($@)" ); + is $config, undef, 'config load failed'; + isnt $@, '', 'error thrown'; }