update changes file
[p5sagit/Config-Any.git] / t / 10-branches.t
index 90dc25b..b211876 100644 (file)
@@ -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,15 +23,23 @@ 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"
     );
 }
 
-my @files = glob( "t/conf/conf.*" );
+# grep out files we don't understand for these tests
+my @files = grep { !m{\.(foo|unsupported)$} } glob( "t/conf/conf.*" );
 my $filter = sub { return };
 ok( Config::Any->load_files( { files => \@files, use_ext => 0 } ),
     "use_ext 0 works" );