Skip to content

Commit

Permalink
fix rt#66705 - localization of HOME in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jul 25, 2011
1 parent 1b204ae commit 5b312fb
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Revision history for Dist::Zilla::Plugin::Git

{{$NEXT}}
- fix rt#66705 - localization of HOME in tests
- fix rt#69616 & rt#69701 - make dzp-git work with git::wrapper 0.015

1.111590 2011-06-08 09:43:35 Europe/Paris
Expand Down
4 changes: 4 additions & 0 deletions t/1-check.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ use warnings;

use Dist::Zilla 1.093250;
use Dist::Zilla::Tester;
use File::Temp qw{ tempdir };
use Git::Wrapper;
use Path::Class;
use Test::More tests => 4;
use Test::Exception;

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

# build fake repository
my $zilla = Dist::Zilla::Tester->from_config({
dist_root => dir(qw(t check)),
Expand Down
4 changes: 4 additions & 0 deletions t/2-commit-build-custom.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ use warnings;

use Dist::Zilla 1.093250;
use Dist::Zilla::Tester;
use File::Temp qw{ tempdir };
use Git::Wrapper;
use Path::Class;
use Test::More tests => 5;
use Cwd qw(cwd);

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

my $cwd = cwd();
my $zilla = Dist::Zilla::Tester->from_config({
dist_root => dir($cwd, qw(t commit-build-custom)),
Expand Down
4 changes: 4 additions & 0 deletions t/2-commit-build.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ use warnings;

use Dist::Zilla 1.093250;
use Dist::Zilla::Tester;
use File::Temp qw{ tempdir };
use Git::Wrapper;
use Path::Class;
use Test::More tests => 4;
use Cwd qw(cwd);

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

my $cwd = cwd();
my $zilla = Dist::Zilla::Tester->from_config({
dist_root => dir($cwd, qw(t commit-build)),
Expand Down
4 changes: 4 additions & 0 deletions t/2-commit-ws.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ use warnings;

use Dist::Zilla 1.093250;
use Dist::Zilla::Tester;
use File::Temp qw{ tempdir };
use Git::Wrapper;
use Path::Class;
use Test::More tests => 1;

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

my $zilla = Dist::Zilla::Tester->from_config({
dist_root => dir(qw(t commit-ws)),
});
Expand Down
4 changes: 4 additions & 0 deletions t/2-commit.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ use warnings;

use Dist::Zilla 1.093250;
use Dist::Zilla::Tester;
use File::Temp qw{ tempdir };
use Git::Wrapper;
use Path::Class;
use Test::More tests => 1;

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

# build fake repository
my $zilla = Dist::Zilla::Tester->from_config({
dist_root => dir(qw(t commit)),
Expand Down
4 changes: 4 additions & 0 deletions t/3-tag.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ use warnings;

use Dist::Zilla 1.093250;
use Dist::Zilla::Tester;
use File::Temp qw{ tempdir };
use Git::Wrapper;
use Path::Class;
use Test::More tests => 4;

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

# build fake repository
my $zilla = Dist::Zilla::Tester->from_config({
dist_root => dir(qw(t tag)),
Expand Down
3 changes: 3 additions & 0 deletions t/4-push-multi.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ use Path::Class;
use Test::More;
use version;

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

# build fake repository
my $zilla = Dist::Zilla::Tester->from_config({
dist_root => dir(qw(t push-multi)),
Expand Down
3 changes: 3 additions & 0 deletions t/4-push.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ use Path::Class;
use Test::More;
use version;

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

# build fake repository
my $zilla = Dist::Zilla::Tester->from_config({
dist_root => dir(qw(t push)),
Expand Down
4 changes: 4 additions & 0 deletions t/5-version-default.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use warnings;
use Dist::Zilla::Tester;
use Git::Wrapper;
use Path::Class;
use File::Temp qw{ tempdir };
use File::pushd qw/pushd tempd/;
use File::Copy::Recursive qw/dircopy/;

Expand All @@ -14,6 +15,9 @@ BEGIN {
@INC = map {; ref($_) ? $_ : dir($_)->absolute->stringify } @INC;
}

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

# save absolute corpus directory path
my $corpus_dir = dir('corpus/version-default')->absolute;

Expand Down
8 changes: 6 additions & 2 deletions t/5-version-regexp.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ use warnings;
use Dist::Zilla::Tester;
use Git::Wrapper;
use Path::Class;
use File::pushd qw/pushd tempd/;
use File::Copy::Recursive qw/dircopy/;
use File::Copy::Recursive qw{ dircopy };
use File::Temp qw{ tempdir };
use File::pushd qw{ pushd tempd };

use Test::More 0.88 tests => 6;

Expand All @@ -14,6 +15,9 @@ BEGIN {
@INC = map {; ref($_) ? $_ : dir($_)->absolute->stringify } @INC;
}

# Mock HOME to avoid ~/.gitexcludes from causing problems
$ENV{HOME} = tempdir( CLEANUP => 1 );

# save absolute corpus directory path
my $corpus_dir = dir('corpus/version-regexp')->absolute;

Expand Down

0 comments on commit 5b312fb

Please sign in to comment.