--- /dev/null
+use strict;
+use warnings;
+
+use Test::More;
+
+
+plan skip_all => 'This test is only run for the module author'
+ unless -d '.hg' || $ENV{IS_MAINTAINER};
+
+eval { require Test::Kwalitee; Test::Kwalitee->import() };
+plan skip_all => "Test::Kwalitee needed for testing kwalitee"
+ if $@;
my @modules = all_modules();
plan tests => scalar @modules;
-my %trustme =
- ( 'MooseX::ClassAttribute' => [ 'init_meta', 'class_has' ],
- 'MooseX::ClassAttribute::Trait::Class' => [ 'compute_all_applicable_class_attributes' ],
- 'MooseX::ClassAttribute::Meta::Method::Accessor' => [ '.+' ]
- );
-
-for my $module ( sort @modules )
-{
+my %trustme = (
+ 'MooseX::ClassAttribute' => [ 'init_meta', 'class_has' ],
+ 'MooseX::ClassAttribute::Trait::Class' =>
+ ['compute_all_applicable_class_attributes'],
+ 'MooseX::ClassAttribute::Meta::Method::Accessor' => ['.+']
+);
+
+for my $module ( sort @modules ) {
my $trustme;
- if ( $trustme{$module} )
- {
+ if ( $trustme{$module} ) {
my $methods = join '|', @{ $trustme{$module} };
- $trustme = [ qr/^(?:$methods)/ ];
+ $trustme = [qr/^(?:$methods)/];
}
- pod_coverage_ok( $module, { trustme => $trustme },
- "Pod coverage for $module"
- );
+ pod_coverage_ok(
+ $module, { trustme => $trustme },
+ "Pod coverage for $module"
+ );
}
--- /dev/null
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::Spelling";
+plan skip_all => "Test::Spelling required for testing POD coverage"
+ if $@;
+
+my @stopwords;
+for (<DATA>) {
+ chomp;
+ push @stopwords, $_
+ unless /\A (?: \# | \s* \z)/msx; # skip comments, whitespace
+}
+
+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__
+PayPal
use Test::More;
-
plan skip_all => 'This test is only run for the module author'
unless -d '.git' || $ENV{IS_MAINTAINER};
--- /dev/null
+use strict;
+use warnings;
+
+use File::Find::Rule;
+use Module::Info;
+
+use Test::More;
+
+my %versions;
+for my $pm_file ( File::Find::Rule->file->name(qr/\.pm$/)->in('lib') ) {
+ my $mod = Module::Info->new_from_file($pm_file);
+
+ ( my $stripped_file = $pm_file ) =~ s{^lib/}{};
+
+ $versions{$stripped_file} = $mod->version;
+}
+
+my $moose_ver = $versions{'MooseX/ClassAttribute.pm'};
+
+for my $module ( grep { $_ ne 'MooseX/ClassAttribute.pm' } sort keys %versions ) {
+ is(
+ $versions{$module}, $moose_ver,
+ "version for $module is the same as in MooseX/ClassAttribute.pm"
+ );
+}
+
+done_testing();