This is an automated email from the git hooks/post-receive script.

abe pushed a commit to annotated tag 2.006000
in repository libdist-zilla-plugin-test-podspelling-perl.

commit 46b6dce669ab383ad8ddc536005345055f1f29e1
Author: David Golden <dagol...@cpan.org>
Date:   Tue Apr 30 10:40:33 2013 -0400

    add test for stopwords from contributors
---
 dist.ini         |  2 ++
 t/contributors.t | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/dist.ini b/dist.ini
index 1e8ef2e..b595dd4 100644
--- a/dist.ini
+++ b/dist.ini
@@ -10,6 +10,8 @@ copyright_holder = Caleb Cushing
 [Prereqs]
 Pod::Wordlist::hanekomu = 0
 Test::Spelling          = 0.12
+[Prereqs / TestRequires]
+Dist::Zilla::Plugin::Meta::Contributors = 0
 
 [ReadmeFromPod]
 [@Filter]
diff --git a/t/contributors.t b/t/contributors.t
new file mode 100644
index 0000000..c6c3a32
--- /dev/null
+++ b/t/contributors.t
@@ -0,0 +1,53 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More 0.88;
+use Test::DZil;
+
+# test the file content generated gets contributor
+
+# contributor data
+my $fname  = 'Mister';
+my $lname = 'Mxyzptlk';
+my $email = 'mr_mxyzp...@example.com';
+
+sub get_content {
+  my ($args) = @_;
+
+  my $name = 'Test::PodSpelling';
+  my $zilla = Builder->from_config(
+    { dist_root => 'corpus/foo' },
+    {
+      add_files => {
+        'source/dist.ini' => dist_ini(
+          {
+            name => 'Spell-Checked',
+            version => 1,
+            abstract => 'spelled wrong',
+            license => 'Perl_5',
+            author => 'John Doe <j...@example.com>',
+            copyright_holder => 'John Doe <j...@example.com>'
+          },
+          [$name => $args],
+          ['Meta::Contributors',
+              {
+                 contributor => ["$fname $lname <$email>"],
+              }
+          ],
+        )
+      }
+    }
+  );
+
+  my $plugin = $zilla->plugin_named($name);
+  $plugin->gather_files;
+  return $zilla->files->[0]->content;
+}
+
+my $content = get_content({});
+
+like   $content, qr/$fname /xms, 'includes first name';
+like   $content, qr/$lname/xms, 'includes last name';
+unlike $content, qr/$email/xms, 'includes email';
+
+done_testing;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-plugin-test-podspelling-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to