File: 31-not-hashref.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 (19 lines) | stat: -rw-r--r-- 424 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
use strict;
use Test::More tests => 1;

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

my $defaults = [
    dispatchers => ['screen'],
    screen => {
        class     => 'Log::Dispatch::Screen',
        min_level => 'debug',
        max_level => 'emergency',
        stderr    => 0,
    },
];

eval{ Log::Dispatch::Configurator::Any->new($defaults) };
like($@, qr/Config must be hashref or filename/);