X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F10-branches.t;h=8368bcc984f46cd2306b27b2e819a6a8a7d9967c;hp=90dc25b8659f27fb8f6317025e6ff3af52f676db;hb=5a2e0210fe5c7da046be37b4240008f2b667be67;hpb=4efab5582d1ec3acd99a2ffb898bed58d5f2420b diff --git a/t/10-branches.t b/t/10-branches.t index 90dc25b..8368bcc 100644 --- a/t/10-branches.t +++ b/t/10-branches.t @@ -1,13 +1,15 @@ -use Test::More tests => 9; -use Config::Any; +use strict; +use warnings; -ok( !Config::Any->load_stems(), "load_stems expects args" ); +use Test::More tests => 10; + +use_ok( 'Config::Any' ); { my @warnings; local $SIG{ __WARN__ } = sub { push @warnings, @_ }; - Config::Any->load_files( ); + Config::Any->load_files(); like( shift @warnings, qr/^No files specified!/, @@ -21,10 +23,17 @@ ok( !Config::Any->load_stems(), "load_stems expects args" ); "load_files expects files" ); + Config::Any->load_stems(); + like( + shift @warnings, + qr/^No stems specified!/, + "load_stems expects args" + ); + Config::Any->load_stems( {} ); like( shift @warnings, - qr/^no stems specified/, + qr/^No stems specified!/, "load_stems expects stems" ); }