Permalink
Browse files

Use subtests

  • Loading branch information...
1 parent 4fae270 commit 0b67bc063b10150eb6bff99236efa8f6655c3adf @petdance committed Aug 20, 2012
Showing with 5 additions and 4 deletions.
  1. +1 −1 Makefile.PL
  2. +4 −3 t/00_modules.t
View
@@ -22,7 +22,7 @@ my %parms = (
'PPI::Cache' => 0,
'PPI::Document' => 0,
'Readonly' => 0,
- 'Test::More' => 0,
+ 'Test::More' => '0.96', # For subtest()
'Test::Perl::Critic' => 1.01,
},
LICENSE => 'perl',
View
@@ -17,16 +17,17 @@ Perl::Critic::TestUtils::block_perlcriticrc();
my @bundled_policy_names = bundled_policy_names();
-plan tests => ( 14 * scalar @bundled_policy_names );
+plan tests => scalar @bundled_policy_names;
# pre-compute for version comparisons
my $version_string = __PACKAGE__->VERSION;
#-----------------------------------------------------------------------------
# Test module interface for each Policy subclass
-{
- for my $mod ( @bundled_policy_names ) {
+for my $mod ( @bundled_policy_names ) {
+ subtest $mod => sub {
+ plan tests => 14;
use_ok($mod);
can_ok($mod, 'applies_to');

0 comments on commit 0b67bc0

Please sign in to comment.