From: Dave Rolsky Date: Sun, 5 Jun 2011 15:40:58 +0000 (-0500) Subject: add manual coverage & spelling tests. Fix spelling errors X-Git-Tag: 0.26~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Types.git;a=commitdiff_plain;h=5a1fdc82b77fa6c2b8491b540d1625cbf63b596e add manual coverage & spelling tests. Fix spelling errors --- diff --git a/lib/MooseX/Types/TypeDecorator.pm b/lib/MooseX/Types/TypeDecorator.pm index 4c2bc8e..3eba05d 100644 --- a/lib/MooseX/Types/TypeDecorator.pm +++ b/lib/MooseX/Types/TypeDecorator.pm @@ -183,7 +183,7 @@ sub DESTROY { =head2 AUTOLOAD -Delegate to the decorator targe +Delegate to the decorator target. =cut diff --git a/lib/MooseX/Types/UndefinedType.pm b/lib/MooseX/Types/UndefinedType.pm index eca9111..e4ed59d 100644 --- a/lib/MooseX/Types/UndefinedType.pm +++ b/lib/MooseX/Types/UndefinedType.pm @@ -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 index 0000000..5a3d2aa --- /dev/null +++ b/xt/release/pod-coverage.t @@ -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 index 0000000..3a1c453 --- /dev/null +++ b/xt/release/pod-spell.t @@ -0,0 +1,47 @@ +use strict; +use warnings; + +use Test::Spelling; + +my @stopwords; +for () { + 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