2 |
use strict; |
use strict; |
3 |
use warnings; |
use warnings; |
4 |
|
|
5 |
use Test::More tests => 8; |
use Test::More tests => 13; |
6 |
use lib 'lib'; |
use lib 'lib'; |
7 |
|
|
8 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
33 |
ok( $o->config->{test}, 'test' ); |
ok( $o->config->{test}, 'test' ); |
34 |
ok( $o->config->{config}, 'config' ); |
ok( $o->config->{config}, 'config' ); |
35 |
is( $o->config->{numeric}, 42, 'numeric' ); |
is( $o->config->{numeric}, 42, 'numeric' ); |
36 |
|
|
37 |
|
ok( my $whole = $o->config('Test::Mock'), 'explicit package' ); |
38 |
|
diag dump($whole) if $debug; |
39 |
|
|
40 |
|
cmp_ok( $o->config->{test}, 'eq', $o->config('Test::Mock')->{test}, 'text' ); |
41 |
|
|
42 |
|
ok( ! $o->config('non-existenting'), 'non-existing' ); |
43 |
|
|
44 |
|
ok( ! $o->load_config, 'load_config' ); |
45 |
|
is_deeply( $o->config, $config, 'not duplicated' ); |