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