Changeset 907 for trunk/t/11_utils.t


Ignore:
Timestamp:
Dec 10, 2006, 9:22:38 PM (15 years ago)
Author:
Earle Martin
Message:

Report Config::Tiny errors - closes #109. Now croaks if specified config file can't be read.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/11_utils.t

    r804 r907  
    33use OpenGuides::Config;
    44use OpenGuides::Utils;
    5 use Test::More tests => 7;
     5use Test::More tests => 8;
    66
    77eval { my $wiki = OpenGuides::Utils->make_wiki_object; };
     
    1010eval { my $wiki = OpenGuides::Utils->make_wiki_object( config => "foo" ); };
    1111ok( $@, "...and if config param isn't an OpenGuides::Config object" );
     12
     13eval {
     14    my $wiki = OpenGuides::Utils->make_wiki_object(
     15        config => OpenGuides::Config->new( file => 'fake' )
     16    );
     17};
     18
     19like( $@, qr/File 'fake' does not exist/, '...and Config::Tiny errors are reported');
    1220
    1321eval { require DBD::SQLite; };
Note: See TracChangeset for help on using the changeset viewer.