Patch for ? in NoBindVars data from Tom Hukins
[dbsrgits/DBIx-Class-Historic.git] / t / 03podcoverage.t
CommitLineData
0fe5201a 1use Test::More;
2
3eval "use Test::Pod::Coverage 1.04";
4plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
5plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
6
97fec99f 7my @modules = sort { $a cmp $b } (Test::Pod::Coverage::all_modules());
7eb4ecc8 8plan tests => scalar(@modules);
9
9b83fccd 10# Since this is about checking documentation, a little documentation
11# of what this is doing might be in order...
12# The exceptions structure below is a hash keyed by the module
13# name. The value for each is a hash, which contains one or more
14# (although currently more than one makes no sense) of the following
15# things:-
16# skip => a true value means this module is not checked
17# ignore => array ref containing list of methods which
18# do not need to be documented.
7eb4ecc8 19my $exceptions = {
20 'DBIx::Class' => {
21 ignore => [
22 qw/MODIFY_CODE_ATTRIBUTES
23 component_base_class
24 mk_classdata/
25 ]
26 },
9b83fccd 27 'DBIx::Class::CDBICompat::AccessorMapping' => { skip => 1 },
28 'DBIx::Class::CDBICompat::AttributeAPI' => { skip => 1 },
29 'DBIx::Class::CDBICompat::AutoUpdate' => { skip => 1 },
30 'DBIx::Class::CDBICompat::ColumnCase' => { skip => 1 },
31 'DBIx::Class::CDBICompat::ColumnGroups' => { skip => 1 },
32 'DBIx::Class::CDBICompat::Constraints' => { skip => 1 },
33 'DBIx::Class::CDBICompat::Constructor' => { skip => 1 },
34 'DBIx::Class::CDBICompat::DestroyWarning' => { skip => 1 },
35 'DBIx::Class::CDBICompat::GetSet' => { skip => 1 },
36 'DBIx::Class::CDBICompat::HasA' => { skip => 1 },
37 'DBIx::Class::CDBICompat::HasMany' => { skip => 1 },
38 'DBIx::Class::CDBICompat::ImaDBI' => { skip => 1 },
39 'DBIx::Class::CDBICompat::LazyLoading' => { skip => 1 },
40 'DBIx::Class::CDBICompat::LiveObjectIndex' => { skip => 1 },
41 'DBIx::Class::CDBICompat::MightHave' => { skip => 1 },
42 'DBIx::Class::CDBICompat::ObjIndexStubs' => { skip => 1 },
43 'DBIx::Class::CDBICompat::Pager' => { skip => 1 },
44 'DBIx::Class::CDBICompat::ReadOnly' => { skip => 1 },
45 'DBIx::Class::CDBICompat::Retrieve' => { skip => 1 },
46 'DBIx::Class::CDBICompat::Stringify' => { skip => 1 },
47 'DBIx::Class::CDBICompat::TempColumns' => { skip => 1 },
48 'DBIx::Class::CDBICompat::Triggers' => { skip => 1 },
49 'DBIx::Class::ClassResolver::PassThrough' => { skip => 1 },
50 'DBIx::Class::Componentised' => { skip => 1 },
51 'DBIx::Class::Relationship::Accessor' => { skip => 1 },
52 'DBIx::Class::Relationship::BelongsTo' => { skip => 1 },
53 'DBIx::Class::Relationship::CascadeActions' => { skip => 1 },
54 'DBIx::Class::Relationship::HasMany' => { skip => 1 },
55 'DBIx::Class::Relationship::HasOne' => { skip => 1 },
56 'DBIx::Class::Relationship::Helpers' => { skip => 1 },
57 'DBIx::Class::Relationship::ManyToMany' => { skip => 1 },
58 'DBIx::Class::Relationship::ProxyMethods' => { skip => 1 },
59 'DBIx::Class::ResultSetProxy' => { skip => 1 },
60 'DBIx::Class::ResultSourceProxy' => { skip => 1 },
046ad905 61 'DBIx::Class::Storage::DBI' => { skip => 1 },
9b83fccd 62 'DBIx::Class::Storage::DBI::DB2' => { skip => 1 },
63 'DBIx::Class::Storage::DBI::MSSQL' => { skip => 1 },
64 'DBIx::Class::Storage::DBI::MultiDistinctEmulation' => { skip => 1 },
65 'DBIx::Class::Storage::DBI::ODBC400' => { skip => 1 },
66 'DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL' => { skip => 1 },
67 'DBIx::Class::Storage::DBI::Oracle' => { skip => 1 },
68 'DBIx::Class::Storage::DBI::Pg' => { skip => 1 },
69 'DBIx::Class::Storage::DBI::SQLite' => { skip => 1 },
70 'DBIx::Class::Storage::DBI::mysql' => { skip => 1 },
71 'SQL::Translator::Parser::DBIx::Class' => { skip => 1 },
72 'SQL::Translator::Producer::DBIx::Class::File' => { skip => 1 },
737416a4 73
74# skipped because the synopsis covers it clearly
75
76 'DBIx::Class::InflateColumn::File' => { skip => 1 },
77
a2800991 78# skip connection since it's just an override
737416a4 79
a2800991 80 'DBIx::Class::Schema::Versioned' => { ignore => [ qw(connection) ] },
737416a4 81
82# must kill authors.
83
84 'DBIx::Class::Storage::DBI::Replication' => { skip => 1 },
7eb4ecc8 85};
86
87foreach my $module (@modules) {
88 SKIP:
89 {
0ebb0072 90 skip "$module - No real methods", 1 if ($exceptions->{$module}{skip});
7eb4ecc8 91
92 # build parms up from ignore list
93 my $parms = {};
94 $parms->{trustme} =
95 [ map { qr/^$_$/ } @{ $exceptions->{$module}{ignore} } ]
96 if exists($exceptions->{$module}{ignore});
97
98 # run the test with the potentially modified parm set
99 pod_coverage_ok($module, $parms, "$module POD coverage");
100 }
101}