/[webpac2]/trunk/t/1-config.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/t/1-config.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 681 - (show annotations)
Sun Sep 24 15:28:49 2006 UTC (17 years, 7 months ago) by dpavlin
File MIME type: application/x-troff
File size: 615 byte(s)
 r957@llin:  dpavlin | 2006-09-24 17:03:52 +0200
 move parts of configuration handling to WebPAC::Config

1 #!/usr/bin/perl -w
2
3 use strict;
4 use Test::More tests => 8;
5 use Test::Exception;
6 use blib;
7
8 use Data::Dump qw/dump/;
9 use Cwd qw/abs_path/;
10
11 BEGIN {
12 use_ok( 'WebPAC::Config' );
13 }
14
15 my $debug = shift @ARGV;
16
17 ok(my $abs_path = abs_path($0), "abs_path");
18 $abs_path =~ s#/[^/]*$#/#;
19
20 my $path = "$abs_path/conf/test.yml";
21
22 ok(my $c = new WebPAC::Config( path => $path ), "new");
23
24 cmp_ok($c->{path}, 'eq', $path, "path $path");
25
26 ok($c->{config}, "config exist");
27
28 isa_ok($c->databases, 'HASH', "databases");
29
30 my @names = $c->databases;
31
32 isa_ok(\@names, 'ARRAY', "databases names");
33
34 cmp_ok(@names, '==', 3, "got 3 names");

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26