Introducing DBIx::Class::Schema::SanityChecker
[dbsrgits/DBIx-Class.git] / xt / dist / pod_coverage.t
index 4f46824..859f0e3 100644 (file)
@@ -8,6 +8,7 @@ use Test::More;
 use Module::Runtime 'require_module';
 use lib 'maint/.Generated_Pod/lib';
 use DBICTest;
+use DBIx::Class::Schema::SanityChecker;
 use namespace::clean;
 
 # this has already been required but leave it here for CPANTS static analysis
@@ -67,6 +68,10 @@ my $exceptions = {
             resolve_prefetch
             STORABLE_freeze
             STORABLE_thaw
+            get_rsrc_instance_specific_attribute
+            set_rsrc_instance_specific_attribute
+            get_rsrc_instance_specific_handler
+            set_rsrc_instance_specific_handler
         /],
     },
     'DBIx::Class::ResultSet' => {
@@ -98,6 +103,11 @@ my $exceptions = {
             connection
         /]
     },
+    'DBIx::Class::Schema::SanityChecker' => {
+        ignore => [ map {
+          qr/^ (?: check_${_} | format_${_}_errors ) $/x
+        } @{ DBIx::Class::Schema::SanityChecker->available_checks } ]
+    },
 
     'DBIx::Class::Admin'        => {
         ignore => [ qw/
@@ -116,7 +126,6 @@ my $exceptions = {
 
     'DBIx::Class::Admin::*'                         => { skip => 1 },
     'DBIx::Class::ClassResolver::PassThrough'       => { skip => 1 },
-    'DBIx::Class::MethodAttributes'                 => { skip => 1 },
     'DBIx::Class::Componentised'                    => { skip => 1 },
     'DBIx::Class::AccessorGroup'                    => { skip => 1 },
     'DBIx::Class::Relationship::*'                  => { skip => 1 },
@@ -178,9 +187,10 @@ foreach my $module (@modules) {
 
     # build parms up from ignore list
     my $parms = {};
-    $parms->{trustme} =
-      [ map { qr/^$_$/ } @{ $ex->{ignore} } ]
-        if exists($ex->{ignore});
+    $parms->{trustme} = [ map
+      { ref $_ eq 'Regexp' ? $_ : qr/^\Q$_\E$/ }
+      @{ $ex->{ignore} }
+    ] if exists($ex->{ignore});
 
     # run the test with the potentially modified parm set
     Test::Pod::Coverage::pod_coverage_ok($module, $parms, "$module POD coverage");