Skip to content

Commit 3ee2f9a

Browse files
committed
Avoid setting env vars
1 parent 9b99ab1 commit 3ee2f9a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

test/extension_test.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,10 @@ class ExtensionTest < Minitest::Test
3939

4040
def given_file_committed_to_fresh_repo(file_name)
4141
dir = Dir.mktmpdir("asciidoctor-git-include-tests-", "/tmp")
42-
ENV['GIT_AUTHOR_NAME'] = "Test"
43-
ENV['GIT_AUTHOR_EMAIL'] = "[email protected]"
44-
ENV['GIT_COMMITTER_EMAIL'] = "[email protected]"
4542
at_exit {
46-
ENV.delete('GIT_AUTHOR_NAME')
47-
ENV.delete('GIT_AUTHOR_EMAIL')
48-
ENV.delete('GIT_COMMITTER_EMAIL')
4943
FileUtils.remove_entry(dir)
5044
}
51-
cmd = %(git init -q #{dir} && echo 'Other repo.' > #{dir}/#{file_name} && git -C #{dir} add #{dir} && git -C #{dir} commit -m 'Initialise the repo')
45+
cmd = %(git init -q #{dir} && git -C #{dir} config --local user.email [email protected] && git -C #{dir} config --local user.name Test && echo 'Other repo.' > #{dir}/#{file_name} && git -C #{dir} add #{dir} && git -C #{dir} commit -m 'Initialise the repo')
5246
%x{#{cmd}}
5347
dir
5448
end

0 commit comments

Comments
 (0)