prep release
[p5sagit/Config-Any.git] / t / 55-yaml.t
1 use strict;
2 use warnings;
3 no warnings 'once';
4
5 use Test::More;
6 use Config::Any::YAML;
7
8 if ( !Config::Any::YAML->is_supported ) {
9     plan skip_all => 'YAML format not supported';
10 }
11 else {
12     plan tests => 4;
13 }
14
15 {
16     my $config = Config::Any::YAML->load( 't/conf/conf.yml' );
17     ok( $config );
18     is( $config->{ name }, 'TestApp' );
19 }
20
21 # test invalid config
22 {
23     my $file = 't/invalid/conf.yml';
24     my $config = eval { Config::Any::YAML->load( $file ) };
25
26     ok( !$config, 'config load failed' );
27     ok( $@,       "error thrown ($@)" );
28 }