Fix docs. The phrases "Fewer than 1%" and "over 96%" are very confusing, so I removed...
[gitmo/Mouse.git] / xt / 03_pod_coverage.t
CommitLineData
c20736cf 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More;
7
8plan skip_all => 'TODO';
9
10eval "use Test::Pod::Coverage 1.04";
11plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
12
13# This is a stripped down version of all_pod_coverage_ok which lets us
14# vary the trustme parameter per module.
15my @modules = all_modules();
16plan tests => scalar @modules;
17
18my %trustme = (
19 'Mouse::Meta::Module' => [
20 ],
21
22 'Mouse::Meta::Class' => [
23 qw(
24 get_method_body
25 superclasses
26 clone_instance
27 )
28 ],
29 'Mouse::Meta::Attribute' => [
30 qw(
31 interpolate_class
32 throw_error
33 create
34 get_parent_args
35 verify_type_constraint
36 canonicalize_args
37 coerce_constraint
38 )
39 ],
40 'Mouse::Meta::Method' => [],
41 'Mouse::Meta::Method::Accessor' => [],
42 'Mouse::Meta::Method::Constructor' => [],
43 'Mouse::Meta::Method::Destructor' => [],
44 'Mouse::Meta::Role' => [],
45 'Mouse::Meta::Role::Composite' =>
46 [ 'get_method', 'get_method_list', 'has_method', 'add_method' ],
47 'Mouse::Role' => [
48 qw( after
49 around
50 augment
51 before
52 extends
53 has
54 inner
55 override
56 super
57 with )
58 ],
59 'Mouse::Meta::TypeConstraint' => [
60 qw(
61 compile_type_constraint
62 parameterize
63 )
64 ],
65 'Mouse::Util' => [
66 qw(
67 generate_isa_predicate_for
68 does dump meta
69 )
70 ],
71 'Mouse::Util::TypeConstraints' => [
72 qw(typecast_constraints)
73 ],
74
75 'Mouse::Exporter' => [
76 qw(
77 do_import do_unimport
78 )
79 ],
80 'Mouse::Spec' => ['.+'],
81 'Squirrel' => ['.+'],
82 'Squirrel::Role' => ['.+'],
83 'Mouse::TypeRegistry' => ['.+'],
84);
85
86for my $module ( sort @modules ) {
87 my $trustme = [];
88 if ( $trustme{$module} ) {
89 my $methods = join '|', @{ $trustme{$module} };
90 $trustme = [qr/^(?:$methods)$/];
91 }
92
93 pod_coverage_ok(
94 $module, { trustme => $trustme },
95 "Pod coverage for $module"
96 );
97}