Skip to content

Commit

Permalink
Remove DZTest
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Mar 4, 2017
1 parent e1c52bd commit dbde69e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Release history for Dist-Zilla-App-Command-critic
[Dependencies::Stats]
- Dependencies changed since 0.001010, see misc/*.deps* for details
- develop: +5 ↑2 -1 (suggests: ↑2)
- test: 1
- test: +2 ↓1 -1

0.001010 2015-04-12T20:14:30Z 237f1a1
[Dependencies::Stats]
Expand Down
7 changes: 7 additions & 0 deletions misc/Changes.deps
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
This file contains changes in REQUIRED dependencies for standard CPAN phases (configure/build/runtime/test)

0.001011
[Added / test requires]
- Dist::Zilla::App::Tester
- Test::TempDir::Tiny

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

[Removed / test requires]
- Dist::Zilla::Util::Test::KENTNL 1.005000

0.001010 2015-04-12T20:14:30Z
[Changed / test requires]
- Dist::Zilla::Util::Test::KENTNL 1.004002 → 1.005000
Expand Down
7 changes: 7 additions & 0 deletions misc/Changes.deps.all
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ This file contains ALL changes in dependencies in both REQUIRED / OPTIONAL depen
- Software::License::Perl_5
- Test::MinimumVersion

[Added / test requires]
- Dist::Zilla::App::Tester
- Test::TempDir::Tiny

[Changed / develop requires]
- Dist::Zilla::Plugin::Test::Compile::PerFile 0 → 0.003902
- Test::More 0.88 → 0.96
Expand All @@ -22,6 +26,9 @@ This file contains ALL changes in dependencies in both REQUIRED / OPTIONAL depen
[Removed / develop requires]
- Dist::Zilla::Plugin::MetaYAML

[Removed / test requires]
- Dist::Zilla::Util::Test::KENTNL 1.005000

0.001010 2015-04-12T20:14:30Z
[Added / develop requires]
- Dist::Zilla::Plugin::Author::KENTNL::TravisCI 0.001002
Expand Down
20 changes: 14 additions & 6 deletions t/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ use strict;
use warnings;

use Test::More;
use Dist::Zilla::Util::Test::KENTNL 1.005000 qw( dztest ); # app
use Dist::Zilla::App::Tester;
use Path::Tiny qw( path );
use Test::TempDir::Tiny qw( tempdir );
use Dist::Zilla::Plugin::GatherDir;
use Test::DZil qw( simple_ini );

my $test = dztest();
$test->add_file( 'dist.ini' => simple_ini( ['GatherDir'] ) );
$test->add_file( 'perlcritic.rc' => <<'EOF' );
my $ini = simple_ini( ['GatherDir'] );
my $critic_rc = <<'EOF';
EOF
$test->add_file( 'lib/Example.pm' => <<'EOF' );
my $example_pm = <<'EOF';
use strict;
use warnings;
Expand All @@ -20,7 +21,14 @@ package Example;
1;
EOF

my $result = $test->run_command( ['critic'] );
my $wd = tempdir('Scratch');

path( $wd, 'dist.ini' )->spew_raw($ini);
path( $wd, 'perlcritic.rc' )->spew_raw($critic_rc);
path( $wd, 'lib' )->mkpath;
path( $wd, 'lib/Example.pm' )->spew_raw($example_pm);

my $result = test_dzil( $wd, ['critic'] );
ok( ref $result, 'self-test executed' );
is( $result->error, undef, 'no errors' );
is( $result->exit_code, 0, 'exit == 0' );
Expand Down

0 comments on commit dbde69e

Please sign in to comment.