MT#20543 Fix spelling unit test

Check manually for the Lancaster Consensus variables instead of using
the Test::DescribeMe module which is not packaged in Debian.

Conditionally use the Test::Spelling module instead of blindly assuming
it is there, as we only run the unit tests when doing author testing,
there is no point in always requiring the module.

Fix all_pod_files_spelling_ok() call, and remove done_testing which
should not be called in this case.

Add some new stop words.

Change-Id: I625cd104093f38cbd36a7439dbd8562d69638d55
changes/50/6650/3
Guillem Jover 9 years ago
parent 32a5bd2f0e
commit a211185cd9

@ -8,7 +8,6 @@ my $builder = Module::Build->new(
'Module::Build' => '0.4004',
},
test_requires => {
'Test::DescribeMe' => 0,
'Test::More' => '0.88',
},
requires => {

@ -1,16 +1,22 @@
use Test::DescribeMe qw(author);
use Test::More import => [qw(done_testing)];
use Test::Spelling qw(add_stopwords all_pod_files_spelling_ok set_spell_cmd);
use Test::More import => [qw(plan)];
plan skip_all => 'Author test' unless $ENV{AUTHOR_TESTING};
if (eval { require Test::Spelling }) {
Test::Spelling->import(qw(add_stopwords all_pod_files_spelling_ok set_spell_cmd));
} else {
plan skip_all => 'Test::Spelling required to spell check';
}
add_stopwords(<DATA>);
set_spell_cmd('aspell list -l en_GB -p /dev/null');
all_pod_files_spelling_ok;
done_testing;
all_pod_files_spelling_ok();
__DATA__
API
Dieckow
GmbH
Ingy's
Ingy
git-dch
merchantability
Sipwise

Loading…
Cancel
Save