diff options
author | nulltoken <emeric.fermas@gmail.com> | 2015-01-23 16:47:19 +0300 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2015-01-23 16:47:19 +0300 |
commit | 6892a942254b9af328f6eb6f87d3b21df1fcbef6 (patch) | |
tree | 684b9e6c1b4a65e19499ac29efa202f3f3ea44ce /LibGit2Sharp.Tests | |
parent | 2f1c52f8db0bbaf434e09bea56e703bf72da2168 (diff) |
Only fake git configuration when necessary
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r-- | LibGit2Sharp.Tests/FetchFixture.cs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/LibGit2Sharp.Tests/FetchFixture.cs b/LibGit2Sharp.Tests/FetchFixture.cs index dd18b517..a83ff554 100644 --- a/LibGit2Sharp.Tests/FetchFixture.cs +++ b/LibGit2Sharp.Tests/FetchFixture.cs @@ -16,7 +16,9 @@ namespace LibGit2Sharp.Tests [InlineData("git://github.com/libgit2/TestGitRepository.git")] public void CanFetchIntoAnEmptyRepository(string url) { - using (var repo = InitIsolatedRepository()) + string path = InitNewRepository(); + + using (var repo = new Repository(path)) { Remote remote = repo.Network.Remotes.Add(remoteName, url); @@ -53,7 +55,9 @@ namespace LibGit2Sharp.Tests InconclusiveIf(() => string.IsNullOrEmpty(Constants.PrivateRepoUrl), "Populate Constants.PrivateRepo* to run this test"); - using (var repo = InitIsolatedRepository()) + string path = InitNewRepository(); + + using (var repo = new Repository(path)) { Remote remote = repo.Network.Remotes.Add(remoteName, Constants.PrivateRepoUrl); @@ -71,7 +75,9 @@ namespace LibGit2Sharp.Tests [InlineData("git://github.com/libgit2/TestGitRepository.git")] public void CanFetchAllTagsIntoAnEmptyRepository(string url) { - using (var repo = InitIsolatedRepository()) + string path = InitNewRepository(); + + using (var repo = new Repository(path)) { Remote remote = repo.Network.Remotes.Add(remoteName, url); @@ -112,7 +118,9 @@ namespace LibGit2Sharp.Tests [InlineData("git://github.com/libgit2/TestGitRepository.git", "master", "first-merge")] public void CanFetchCustomRefSpecsIntoAnEmptyRepository(string url, string localBranchName, string remoteBranchName) { - using (var repo = InitIsolatedRepository()) + string path = InitNewRepository(); + + using (var repo = new Repository(path)) { Remote remote = repo.Network.Remotes.Add(remoteName, url); @@ -147,7 +155,9 @@ namespace LibGit2Sharp.Tests { string url = "http://github.com/libgit2/TestGitRepository"; - using (var repo = InitIsolatedRepository()) + string path = InitNewRepository(); + + using (var repo = new Repository(path)) { Remote remote = repo.Network.Remotes.Add(remoteName, url); Assert.NotNull(remote); |