4 use Test::More tests => 8;
8 use Data::Dump qw/dump/;
12 use_ok( 'WebPAC::Config' );
15 my $debug = shift @ARGV;
17 ok(my $abs_path = abs_path($0), "abs_path");
18 $abs_path =~ s#/[^/]*$#/#;
20 my $path = "$abs_path/conf/test.yml";
22 ok(my $c = new WebPAC::Config( path => $path ), "new");
24 cmp_ok($c->{path}, 'eq', $path, "path $path");
26 ok($c->{config}, "config exist");
28 isa_ok($c->databases, 'HASH', "databases");
30 my @names = $c->databases;
32 isa_ok(\@names, 'ARRAY', "databases names");
34 cmp_ok(@names, '==', 3, "got 3 names");