add manual coverage & spelling tests. Fix spelling errors
Dave Rolsky [Sun, 5 Jun 2011 15:40:58 +0000 (10:40 -0500)]
lib/MooseX/Types/TypeDecorator.pm
lib/MooseX/Types/UndefinedType.pm
xt/release/pod-coverage.t [new file with mode: 0644]
xt/release/pod-spell.t [new file with mode: 0644]

index 4c2bc8e..3eba05d 100644 (file)
@@ -183,7 +183,7 @@ sub DESTROY {
 
 =head2 AUTOLOAD
 
-Delegate to the decorator targe
+Delegate to the decorator target.
 
 =cut
 
index eca9111..e4ed59d 100644 (file)
@@ -44,7 +44,7 @@ sub name {
 
 =head2 can_be_inlined
 
-Always returns false. Needed for compatbility with Moose 2.0100+.
+Always returns false. Needed for compatibility with Moose 2.0100+.
 
 =cut
 
diff --git a/xt/release/pod-coverage.t b/xt/release/pod-coverage.t
new file mode 100644 (file)
index 0000000..5a3d2aa
--- /dev/null
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+use Test::Requires {
+    'Test::Pod::Coverage'  => '1.04',
+    'Pod::Coverage::Moose' => '0.02',
+};
+
+my %skip = map { $_ => 1 } qw( MooseX::Types::CheckedUtilExports );
+
+my @modules = grep { !( $skip{$_} } all_modules();
+
+my %trustme = ( Courriel => ['replace_body'] );
+
+for my $module ( sort @modules ) {
+    my $trustme = [];
+
+    if ( $trustme{$module} ) {
+        if ( ref $trustme{$module} eq 'ARRAY' ) {
+            my $methods = join '|', @{ $trustme{$module} };
+            $trustme = [qr/^(?:$methods)$/];
+        }
+        else {
+            $trustme = [ $trustme{$module} ];
+        }
+    }
+
+    push @{$trustme}, qr/^BUILD$/;
+
+    pod_coverage_ok(
+        $module, {
+            coverage_class => 'Pod::Coverage::Moose',
+            trustme        => $trustme,
+        },
+        "Pod coverage for $module"
+    );
+}
+
+done_testing();
diff --git a/xt/release/pod-spell.t b/xt/release/pod-spell.t
new file mode 100644 (file)
index 0000000..3a1c453
--- /dev/null
@@ -0,0 +1,47 @@
+use strict;
+use warnings;
+
+use Test::Spelling;
+
+my @stopwords;
+for (<DATA>) {
+    chomp;
+    push @stopwords, $_
+        unless /\A (?: \# | \s* \z)/msx;
+}
+
+add_stopwords(@stopwords);
+set_spell_cmd('aspell list -l en');
+
+# This prevents a weird segfault from the aspell command - see
+# https://bugs.launchpad.net/ubuntu/+source/aspell/+bug/71322
+local $ENV{LC_ALL} = 'C';
+all_pod_files_spelling_ok;
+
+__DATA__
+API
+Kitover
+MyStr
+Napiorkowski
+Pearcey
+Perlop
+Ragwitz
+Rolsky
+Sedlacek
+StrOrArrayRef
+TODO
+TypeAndSubExporter
+Upi
+autarch
+caelum
+documention
+gotcha's
+hdp
+isa
+jnapiorkowski
+parameterize
+parameterized
+phaylon
+rafl
+subtyping
+typeconstraint