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

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

commit f4aada464d388336c1fd6be087b7800a59daefef
Author: Karen Etheridge <et...@cpan.org>
Date:   Mon Mar 3 19:35:59 2014 -0800

    test to ensure that distmeta does not get called before filemunging phase
---
 t/phase.t | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/t/phase.t b/t/phase.t
new file mode 100644
index 0000000..5fe0dd6
--- /dev/null
+++ b/t/phase.t
@@ -0,0 +1,46 @@
+use strict;
+use warnings;
+use Test::More;
+use Test::DZil;
+use Test::Fatal;
+
+{
+       package Dist::Zilla::Plugin::CheckPhases;
+       use Moose;
+       with 'Dist::Zilla::Role::FileMunger';
+       use Moose::Util 'find_meta';
+
+       # runs before [Test::PodSpelling]'s munge_files
+       sub munge_files
+       {
+               my $self = shift;
+               my $distmeta_attr = 
find_meta($self->zilla)->find_attribute_by_name('distmeta');
+               die 'distmeta has already been calculated before file munging 
phase!'
+                       if $distmeta_attr->has_value($self->zilla);
+       }
+}
+
+my $tzil
+       = Builder->from_config(
+               {
+                       dist_root    => 'corpus/a',
+               },
+               {
+                       add_files => {
+                               'source/lib/Foo.pm' => "package Foo;\n1;\n",
+                               'source/dist.ini' => simple_ini(
+                                       [ GatherDir => ],
+                                       [ CheckPhases => ],
+                                       ['Test::PodSpelling']
+                               )
+                       }
+               },
+       );
+
+is(
+       exception { $tzil->build },
+       undef,
+       'no exceptions during dzil build',
+);
+
+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