fix t/64-extfail.t to pass when t/lib is in @INC
[p5sagit/Config-Any.git] / t / 53-perl.t
1 use strict;
2 use warnings;
3
4 use Test::More tests => 5;
5
6 use Config::Any::Perl;
7
8 {
9     my $file   = 't/conf/conf.pl';
10     my $config = Config::Any::Perl->load( $file );
11
12     ok( $config );
13     is( $config->{ name }, 'TestApp' );
14
15     my $config_load2 = Config::Any::Perl->load( $file );
16     is_deeply( $config_load2, $config, 'multiple loads of the same file' );
17 }
18
19 # test invalid config
20 {
21     my $file = 't/invalid/conf.pl';
22     my $config = eval { Config::Any::Perl->load( $file ) };
23
24     ok( !$config, 'config load failed' );
25     ok( $@,       "error thrown ($@)" );
26 }