Skip to content
Browse files

Use xenoterracide's Test::Version and Dist::Zilla::Plugin::Test::Version

Fixes issue #9: VersionTests
  • Loading branch information...
1 parent b29d25c commit 368c7dbd6babd5e0e355d92d8578a160c707884c @doherty committed May 31, 2011
Showing with 11 additions and 19 deletions.
  1. +1 −0 Changes
  2. +1 −0 dist.ini
  3. +5 −16 lib/Dist/Zilla/PluginBundle/TestingMania.pm
  4. +4 −3 t/01-test-manifest.t
View
1 Changes
@@ -3,6 +3,7 @@ Changelog for Dist::Zilla::PluginBundle::TestingMania
{{$NEXT}}
0.011 2011-05-09
+ * Add a Test::Version plugin by xenoterrocide; remove superseded plugins
* Allow setting a perlcritic config file
0.010 2011-04-20
View
1 dist.ini
@@ -13,6 +13,7 @@ critic_config = .perlcriticrc
Test::Perl::Critic = 0
Test::CPAN::Meta = 0
Pod::Coverage::TrustPod = 0
+Test::Version = 0.07; xenoterracide's module + bugfixes
[LatestPrereqs]
:version = 0.4
View
21 lib/Dist/Zilla/PluginBundle/TestingMania.pm
@@ -7,11 +7,9 @@ use 5.010001; # We use the smart match operator
use Dist::Zilla::Plugin::Test::CPAN::Changes qw();
use Dist::Zilla::Plugin::CompileTests qw();
-use Dist::Zilla::Plugin::ConsistentVersionTest qw();
use Dist::Zilla::Plugin::CriticTests 1.102280 qw();
use Dist::Zilla::Plugin::DistManifestTests qw();
use Dist::Zilla::Plugin::EOLTests 0.02 qw(); # Also checks for trailing whitespace
-use Dist::Zilla::Plugin::HasVersionTests qw();
use Dist::Zilla::Plugin::KwaliteeTests qw();
use Dist::Zilla::Plugin::MetaTests qw();
use Dist::Zilla::Plugin::MinimumVersionTests qw();
@@ -22,6 +20,7 @@ use Dist::Zilla::Plugin::PodSyntaxTests qw();
use Dist::Zilla::Plugin::PortabilityTests qw();
use Dist::Zilla::Plugin::SynopsisTests qw();
use Dist::Zilla::Plugin::UnusedVarsTests qw();
+use Dist::Zilla::Plugin::Test::Version 0.001002 qw(); # New name
use Dist::Zilla::Plugin::Test::Pod::LinkCheck qw();
use Dist::Zilla::Plugin::Test::CPAN::Meta::JSON 0.003 qw(); # Prunes itself when META.json isn't present
@@ -45,10 +44,6 @@ Simply add the following near the end of F<dist.ini>:
[@TestingMania]
-It includes the most recent version (as of release time) of the following
-plugins, in their default configuration. Note that not all the plugins
-are actually I<used> by default.
-
=head2 Testing plugins
=over 4
@@ -60,12 +55,6 @@ dist.
=item *
-L<Dist::Zilla::Plugin::ConsistentVersionTest>, which tests that all modules in
-the dist have the same version. See L<Test::ConsistentVersion> for details. This
-is not enabled by default; see L</"Enabling Tests">.
-
-=item *
-
L<Dist::Zilla::Plugin::CriticTests>, which checks your code against best
practices. See L<Perl::Critic> for details. You can set a perlcritic config
file:
@@ -85,8 +74,9 @@ used (and also checks for trailing whitespace). See L<Test::EOL> for details.
=item *
-L<Dist::Zilla::Plugin::HasVersionTests>, which tests that your dist has version
-numbers. See L<Test::HasVersion> for what that means.
+L<Dist::Zilla::Plugin::Test::Version>, which tests that your dist has
+version numbers, and that they are valid. See L<Test::Version> for exactly
+what that means.
=item *
@@ -194,12 +184,11 @@ sub configure {
'Test::CPAN::Changes' => $self->config_slice('changelog'),
'Test::CPAN::Meta::JSON'=> 1, # prunes itself if META.json isn't there
'Test::Pod::LinkCheck' => 1,
+ 'Test::Version' => 1,
CompileTests => 1,
- ConsistentVersionTest => 0, # finnicky and annoying
CriticTests => $self->config_slice('critic_config'),
DistManifestTests => 1,
EOLTests => 1,
- HasVersionTests => 1,
KwaliteeTests => 1,
MetaTests => 1, # should only be loaded if MetaYAML is loaded, or the file exists in the dist
MinimumVersionTests => 1,
View
7 t/01-test-manifest.t
@@ -25,17 +25,17 @@ subtest 'default' => sub {
'tests are all there') or diag explain \@tests;
my @xtests = map $_->name =~ m{^xt/} ? $_->name : (), $tzil->files->flatten;
- is_filelist(\@xtests, [qw( xt/author/critic.t xt/release/kwalitee.t
+ is_filelist(\@xtests, [qw( xt/author/critic.t xt/release/kwalitee.t
xt/release/unused-vars.t xt/release/minimum-version.t xt/release/dist-manifest.t
- xt/release/portability.t xt/release/pod-coverage.t xt/release/has-version.t
+ xt/release/portability.t xt/release/pod-coverage.t xt/release/test-version.t
xt/release/eol.t xt/release/cpan-changes.t xt/release/synopsis.t
xt/release/no-tabs.t xt/release/pod-linkcheck.t xt/release/pod-syntax.t
xt/release/distmeta.t xt/release/meta-json.t xt/release/mojibake.t)],
'xtests are all there') or diag explain \@xtests;
};
subtest 'enable' => sub {
- plan tests => 1;
+ plan skip_all => 'all tests are on by default now';#tests => 1;
my $tzil = Builder->from_config(
{ dist_root => 'corpus/dist/DZT' },
@@ -51,6 +51,7 @@ subtest 'enable' => sub {
my $has_consistentversiontest = grep $_->name eq 'xt/release/consistent-version.t', $tzil->files->flatten;
ok($has_consistentversiontest, 'ConsistentVersionTest added itself');
+ diag explain map { $_->name } $tzil->files->flatten;
};
subtest 'disable' => sub {

0 comments on commit 368c7db

Please sign in to comment.
Something went wrong with that request. Please try again.