list the authordeps in a cpanfile for easier installation
[catagits/Catalyst-Runtime.git] / t / aggregate.t
index fc10888..543fe02 100644 (file)
@@ -5,13 +5,27 @@ use warnings;
 
 use FindBin;
 use lib "$FindBin::Bin/lib";
+use File::Spec::Functions 'catfile', 'updir';
 
-use Test::Aggregate;
+BEGIN {
+    unless (-e catfile $FindBin::Bin, updir, '.aggregating') {
+        require Test::More;
+        Test::More::plan(skip_all => 'No test aggregation requested');
+    }
+}
+
+BEGIN {
+    unless (eval { require Test::Aggregate; Test::Aggregate->VERSION('0.364'); 1 }) {
+        require Test::More;
+        Test::More::plan(skip_all => 'Test::Aggregate 0.364 required for test aggregation');
+    }
+}
 
 my $tests = Test::Aggregate->new({
-    dirs          => 't/aggregate',
-    verbose       => 1,
+    (@ARGV ? (tests => \@ARGV) : (dirs => 't/aggregate')),
+    verbose       => 0,
     set_filenames => 1,
+    findbin       => 1,
 });
 
 $tests->run;