2 |
use strict; |
use strict; |
3 |
use warnings; |
use warnings; |
4 |
|
|
5 |
use Test::More tests => 12; |
use Test::More tests => 13; |
6 |
use lib 'lib'; |
use lib 'lib'; |
7 |
|
|
8 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
9 |
|
|
10 |
my $debug = 1 if @ARGV; |
my $debug = @ARGV ? 1 : 0; |
11 |
|
|
12 |
BEGIN { |
BEGIN { |
13 |
use_ok('Frey::Config'); |
use_ok('Frey::Config'); |
39 |
|
|
40 |
cmp_ok( $o->config->{test}, 'eq', $o->config('Test::Mock')->{test}, 'text' ); |
cmp_ok( $o->config->{test}, 'eq', $o->config('Test::Mock')->{test}, 'text' ); |
41 |
|
|
42 |
ok( ! eval { $o->config('non-existenting') }, 'non-existing' ); |
ok( ! $o->config('non-existenting'), 'non-existing' ); |
43 |
ok( $@, 'detected' ); |
|
44 |
|
ok( ! $o->load_config, 'load_config' ); |
45 |
|
is_deeply( $o->config, $config, 'not duplicated' ); |