fixes for the applied_attribute stuff in moose 2
[catagits/Reaction.git] / t / 03podcoverage.t
1 use strict;
2 use warnings;
3 use Test::More;
4
5 eval "use Test::Pod::Coverage 1.04";
6 plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
7 plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
8
9 my @modules = sort { $a cmp $b } (Test::Pod::Coverage::all_modules());
10 @modules = grep {!/^ComponentUI::/} @modules;
11 plan tests => scalar(@modules);
12
13 # methods to ignore on all modules
14 my $exceptions = {
15   ignore => [
16               qw/ BUILD build_ can_ clear_ has_ do_ adopt_ accept_
17                   apply_ layout value meta /
18             ]
19 };
20
21 foreach my $module (@modules) {
22   # build parms up from ignore list
23   my $parms = {};
24   $parms->{trustme} =
25     [ map { qr/^$_/ } @{ $exceptions->{ignore} } ]
26     if exists($exceptions->{ignore});
27
28   # run the test with the potentially modified parm set
29   pod_coverage_ok($module, $parms, "$module POD coverage");
30 }