Skip to content

Commit

Permalink
Set git user info during arbua tests
Browse files Browse the repository at this point in the history
Because the HOME directory is reset for these tests git would not use
an existing global configuration. Write the user.name and user.email
into the testing home directory, so valid value will be present when
committing during the integration tests.
  • Loading branch information
acant committed Oct 10, 2015
1 parent 0361b1c commit 68677e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/integration/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def before_setup
FileUtils.rm_rf(current_dir)
set_env('HOME', abs_current_dir)
GitFactory.working_directory = abs_current_dir

FileUtils.mkdir_p(abs_current_dir)
Rugged::Config.global['user.name'] = GitFactory.users[0][:name]
Rugged::Config.global['user.email'] = GitFactory.users[0][:email]
end

def teardown
Expand Down

0 comments on commit 68677e0

Please sign in to comment.