Skip to content
Browse files

Install 'test' prereqs by default

  • Loading branch information...
1 parent 50848ff commit 20ed12c30c3143d9a651a9259653f03132924e66 @miyagawa miyagawa committed
Showing with 27 additions and 1 deletion.
  1. +1 −1 lib/Carton.pm
  2. +26 −0 xt/cli/test_deps.t
View
2 lib/Carton.pm
@@ -52,7 +52,7 @@ sub list_dependencies {
my $reqs = CPAN::Meta::Requirements->new;
$reqs->add_requirements($prereq->requirements_for($_, 'requires'))
- for qw( configure build runtime ); # add test
+ for qw( configure build runtime test );
my $hash = $reqs->as_string_hash;
# TODO refactor to not rely on string representation
View
26 xt/cli/test_deps.t
@@ -0,0 +1,26 @@
+use strict;
+use Test::More;
+use xt::CLI;
+use Cwd;
+
+my $cwd = Cwd::cwd();
+
+{
+ my $app = cli();
+
+ $app->dir->touch("cpanfile", <<EOF);
+on test => sub {
+ requires 'Test::NoWarnings';
+};
+EOF
+
+ $app->run("install");
+
+ $app->run("list");
+ like $app->output, qr/Test-NoWarnings/;
+}
+
+done_testing;
+
+
+

0 comments on commit 20ed12c

Please sign in to comment.
Something went wrong with that request. Please try again.