File: 20-file.t

package info (click to toggle)
liblog-dispatch-configurator-any-perl 1.110690-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 156 kB
  • sloc: perl: 96; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 582 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use Test::More tests => 3;

use Log::Dispatch::Config;
use Log::Dispatch::Configurator::Any;

SKIP: {
    eval { require Config::Tiny };
    skip 'no Config::Tiny installed', 3 if $@;

    my $cfg_file = 't/cfg_file.ini';
    ok(-f $cfg_file, "Config exists");

    my $config  = Log::Dispatch::Configurator::Any->new($cfg_file);
    isa_ok($config, 'Log::Dispatch::Configurator::Any');

    Log::Dispatch::Config->configure($config);

    {
        my $disp = Log::Dispatch::Config->instance;
        isa_ok $disp->{outputs}->{syslog}, 'Log::Dispatch::Syslog';
    }
}