From a211185cd97075f15a060459c53d99b80441f209 Mon Sep 17 00:00:00 2001
From: Guillem Jover <gjover@sipwise.com>
Date: Mon, 13 Jun 2016 17:31:24 +0200
Subject: [PATCH] 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
---
 Build.PL     |  1 -
 t/spelling.t | 18 ++++++++++++------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/Build.PL b/Build.PL
index 939b65d..3d1a458 100644
--- a/Build.PL
+++ b/Build.PL
@@ -8,7 +8,6 @@ my $builder = Module::Build->new(
         'Module::Build' => '0.4004',
     },
     test_requires    => {
-        'Test::DescribeMe' => 0,
         'Test::More' => '0.88',
     },
     requires => {
diff --git a/t/spelling.t b/t/spelling.t
index a57a236..0875fdc 100644
--- a/t/spelling.t
+++ b/t/spelling.t
@@ -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