File: 21-not-hashref-in-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 (16 lines) | stat: -rw-r--r-- 408 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use Test::More tests => 2;

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

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

    my $cfg_file = 't/cfg_file_bad.yml';
    ok(-f $cfg_file, "Config exists");
    
    eval{ Log::Dispatch::Configurator::Any->new($cfg_file) };
    like($@, qr/does not build a Hash/, 'does not build a Hash');
}