X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F55-yaml.t;h=3c95831e6e28243d9687002642d136fc6064ccb3;hp=74ff1b1189ebb987eac929f6510fb679a6aecbca;hb=5f5b9e4c575591a0749103e0bbeb556cde5c5cac;hpb=572501abb2165014af8973bf9a4aa1f8a522356d diff --git a/t/55-yaml.t b/t/55-yaml.t index 74ff1b1..3c95831 100644 --- a/t/55-yaml.t +++ b/t/55-yaml.t @@ -1,11 +1,18 @@ -use Test::More tests => 2; - -use Config::Any::YAML; - -my $config = eval { Config::Any::YAML->load( 't/conf/conf.yml' ) }; - -SKIP: { - skip "Couldn't Load YAML plugin", 2 if $@; - ok( $config ); - is( $config->{ name }, 'TestApp' ); -} +use strict; +use warnings; + +use Test::More; +use Config::Any::YAML; + +if ( !Config::Any::YAML->is_supported ) { + plan skip_all => 'YAML format not supported'; +} +else { + plan tests => 2; +} + +{ + my $config = Config::Any::YAML->load( 't/conf/conf.yml' ); + ok( $config ); + is( $config->{ name }, 'TestApp' ); +}