Skip to content

Commit cb77afa

Browse files
committed
Split out test git user configuration
1 parent 1f33a73 commit cb77afa

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

t/scm/git.t

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,17 @@ else {
2828
plan skip_all => 'Can not find git command';
2929
}
3030

31+
my $git_user_name = 'Rex';
32+
my $git_user_email = '[email protected]';
3133
my $empty_config_file = $OSNAME eq 'MSWin32' ? q() : File::Spec->devnull();
3234

3335
my $git_environment = {
34-
GIT_CONFIG_GLOBAL => $empty_config_file,
35-
GIT_CONFIG_SYSTEM => $empty_config_file,
36+
GIT_CONFIG_GLOBAL => $empty_config_file,
37+
GIT_CONFIG_SYSTEM => $empty_config_file,
38+
GIT_AUTHOR_NAME => $git_user_name,
39+
GIT_AUTHOR_EMAIL => $git_user_email,
40+
GIT_COMMITTER_NAME => $git_user_name,
41+
GIT_COMMITTER_EMAIL => $git_user_email,
3642
};
3743

3844
ok( $git, "Found git command at $git" );
@@ -86,11 +92,6 @@ sub prepare_test_repo {
8692

8793
i_run 'git init', cwd => $directory, env => $git_environment;
8894

89-
i_run 'git config user.name Rex', cwd => $directory, env => $git_environment;
90-
i_run 'git config user.email [email protected]',
91-
cwd => $directory,
92-
env => $git_environment;
93-
9495
i_run 'git commit --allow-empty -m commit',
9596
cwd => $directory,
9697
env => $git_environment;

0 commit comments

Comments
 (0)