Skip to content

Commit

Permalink
Remove dztest from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Mar 9, 2017
1 parent d0b03ea commit 71060a2
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 96 deletions.
3 changes: 2 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ Release history for Dist-Zilla-Plugin-if-ENV
{{$NEXT}}
- Bugfix: Avoid test failures with -Ddefault_inc_excludes_dot
- Remove use of ConfigDumper util
- Remove Test::KENTNL/dztest from tests

[Dependencies::Stats]
- Dependencies changed since 0.001000, see misc/*.deps* for details
- configure: +1 (recommends: ↑1)
- develop: +13 ↑4 -3 (recommends: +1, suggests: ↑2)
- runtime: ↓1 -2 (recommends: +1)
- test: +1 (recommends: ↑1 ↓1)
- test: +1 ↓1 -1 (recommends: ↑1 ↓1)

0.001000 2014-09-06T02:39:34Z
- First version.
6 changes: 6 additions & 0 deletions misc/Changes.deps
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ This file contains changes in REQUIRED dependencies for standard CPAN phases (co
[Changed / runtime requires]
- perl 5.008 → 5.006

[Changed / test requires]
- Test::More 0.96 → 0

[Removed / runtime requires]
- Dist::Zilla::Util::ConfigDumper
- utf8

[Removed / test requires]
- Dist::Zilla::Util::Test::KENTNL 1.003001
6 changes: 6 additions & 0 deletions misc/Changes.deps.all
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ This file contains ALL changes in dependencies in both REQUIRED / OPTIONAL depen
- ExtUtils::MakeMaker 6.98 → 7.00
- Test::More 1.001006 → 0.99

[Changed / test requires]
- Test::More 0.96 → 0

[Removed / develop requires]
- Dist::Zilla::Plugin::EOLTests
- Dist::Zilla::Plugin::MetaYAML
Expand All @@ -56,3 +59,6 @@ This file contains ALL changes in dependencies in both REQUIRED / OPTIONAL depen
[Removed / runtime requires]
- Dist::Zilla::Util::ConfigDumper
- utf8

[Removed / test requires]
- Dist::Zilla::Util::Test::KENTNL 1.003001
48 changes: 24 additions & 24 deletions t/basic_not_off.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
use strict;
use warnings;

use Test::More 0.96;
use Test::DZil qw( simple_ini );
use Dist::Zilla::Util::Test::KENTNL 1.003001 qw( dztest );
use Test::More tests => 1;
use Test::DZil qw( simple_ini Builder );

# ABSTRACT: Test basic loading

my $test = dztest();
$ENV{AIRPLANE} = 0; # This should Load.

$test->add_file( 'sample.txt', q[] );
$test->add_file(
'dist.ini',
simple_ini(
['MetaConfig'],
[
'if::not::ENV',
{
key => 'AIRPLANE',
dz_plugin => 'GatherDir',
}
]
)
my $zilla = Builder->from_config(
{ dist_root => 'invalid' },
{
add_files => {
'source/sample.txt' => q[],
'source/dist.ini' => simple_ini(
['MetaConfig'],
[
'if::not::ENV',
{
key => 'AIRPLANE',
dz_plugin => 'GatherDir',
}
]
)
}
}
);
$test->build_ok;
isnt( $test->built_file('sample.txt'), undef, 'sample.txt gathers without airplane mode' );
note explain $test->builder->log_messages;
note explain [ grep { $_->{class} !~ /FinderCode/ } @{ $test->distmeta->{x_Dist_Zilla}->{plugins} } ];

done_testing;

$zilla->chrome->logger->set_debug(1);
$zilla->build;
isnt( -e ( $zilla->tempdir . '/build/sample.txt' ), undef, 'sample.txt gathers without airplane mode' );
note explain $zilla->log_messages;
note explain [ grep { $_->{class} !~ /FinderCode/ } @{ $zilla->distmeta->{x_Dist_Zilla}->{plugins} } ];
48 changes: 24 additions & 24 deletions t/basic_not_on.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
use strict;
use warnings;

use Test::More 0.96;
use Test::DZil qw( simple_ini );
use Dist::Zilla::Util::Test::KENTNL 1.003001 qw( dztest );
use Test::More tests => 1;
use Test::DZil qw( simple_ini Builder );

# ABSTRACT: Test basic loading

my $test = dztest();
$ENV{AIRPLANE} = 1; # This should not load

$test->add_file( 'sample.txt', q[] );
$test->add_file(
'dist.ini',
simple_ini(
['MetaConfig'],
[
'if::not::ENV',
{
key => 'AIRPLANE',
dz_plugin => 'GatherDir',
}
]
)
my $zilla = Builder->from_config(
{ dist_root => 'invalid' },
{
add_files => {
'source/sample.txt' => q[],
'source/dist.ini' => simple_ini(
['MetaConfig'],
[
'if::not::ENV',
{
key => 'AIRPLANE',
dz_plugin => 'GatherDir',
}
]
)
},
}
);
$test->build_ok;
is( $test->built_file('sample.txt'), undef, 'sample.txt should not gathers with airplane mode' );
note explain $test->builder->log_messages;
note explain [ grep { $_->{class} !~ /FinderCode/ } @{ $test->distmeta->{x_Dist_Zilla}->{plugins} } ];

done_testing;
$zilla->chrome->logger->set_debug(1);
$zilla->build;

is( -e ( $zilla->tempdir . '/build/sample.txt' ), undef, 'sample.txt should not gathers with airplane mode' );
note explain $zilla->log_messages;
note explain [ grep { $_->{class} !~ /FinderCode/ } @{ $zilla->distmeta->{x_Dist_Zilla}->{plugins} } ];
48 changes: 24 additions & 24 deletions t/basic_off.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
use strict;
use warnings;

use Test::More 0.96;
use Test::DZil qw( simple_ini );
use Dist::Zilla::Util::Test::KENTNL 1.003001 qw( dztest );
use Test::More tests => 1;
use Test::DZil qw( simple_ini Builder );

# ABSTRACT: Test basic loading

my $test = dztest();
$ENV{AIRPLANE} = 0; # This should NOT Load.

$test->add_file( 'sample.txt', q[] );
$test->add_file(
'dist.ini',
simple_ini(
['MetaConfig'],
[
'if::ENV',
{
key => 'AIRPLANE',
dz_plugin => 'GatherDir',
}
]
)
my $zilla = Builder->from_config(
{ dist_root => 'invalid' },
{
add_files => {
'source/sample.txt' => q[],
'source/dist.ini' => simple_ini(
['MetaConfig'],
[
'if::ENV',
{
key => 'AIRPLANE',
dz_plugin => 'GatherDir',
}
]
)
},
}
);
$test->build_ok;
is( $test->built_file('sample.txt'), undef, 'sample.txt does not gather without airplane mode' );
note explain $test->builder->log_messages;
note explain [ grep { $_->{class} !~ /FinderCode/ } @{ $test->distmeta->{x_Dist_Zilla}->{plugins} } ];

done_testing;

$zilla->chrome->logger->set_debug(1);
$zilla->build;
is( -e ( $zilla->tempdir . '/build/sample.txt' ), undef, 'sample.txt does not gather without airplane mode' );
note explain $zilla->log_messages;
note explain [ grep { $_->{class} !~ /FinderCode/ } @{ $zilla->distmeta->{x_Dist_Zilla}->{plugins} } ];
47 changes: 24 additions & 23 deletions t/basic_on.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,34 @@
use strict;
use warnings;

use Test::More 0.96;
use Test::DZil qw( simple_ini );
use Dist::Zilla::Util::Test::KENTNL 1.003001 qw( dztest );
use Test::More tests => 1;
use Test::DZil qw( simple_ini Builder );

# ABSTRACT: Test basic loading

my $test = dztest();
$ENV{AIRPLANE} = 1; # This should load.

$test->add_file( 'sample.txt', q[] );
$test->add_file(
'dist.ini',
simple_ini(
['MetaConfig'],
[
'if::ENV',
{
key => 'AIRPLANE',
dz_plugin => 'GatherDir',
}
]
)
my $zilla = Builder->from_config(
{ dist_root => 'invalid' },
{
add_files => {
'source/sample.txt' => q[],
'source/dist.ini' => simple_ini(
['MetaConfig'],
[
'if::ENV',
{
key => 'AIRPLANE',
dz_plugin => 'GatherDir',
}
]
)
}
}
);
$test->build_ok;
isnt( $test->built_file('sample.txt'), undef, 'sample.txt gathers in airplane mode' );
note explain $test->builder->log_messages;
note explain [ grep { $_->{class} !~ /FinderCode/ } @{ $test->distmeta->{x_Dist_Zilla}->{plugins} } ];

done_testing;

$zilla->chrome->logger->set_debug(1);
$zilla->build;
isnt( -e ( $zilla->tempdir . '/build/sample.txt' ), undef, 'sample.txt gathers in airplane mode' );
note explain $zilla->log_messages;
note explain [ grep { $_->{class} !~ /FinderCode/ } @{ $zilla->distmeta->{x_Dist_Zilla}->{plugins} } ];

0 comments on commit 71060a2

Please sign in to comment.