Skip to content

Commit e1a2f0c

Browse files
gitfoolarturcic
authored andcommitted
Fix integration test to check exit code
1 parent 54b6899 commit e1a2f0c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/GitVersionExe.Tests/ExecCmdLineArgumentTest.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ public void CheckBuildServerVerbosityConsole(string verbosityArg, string expecte
7272
}
7373

7474
[Test]
75-
public void WorkingDirectoryWithoutGitFolderCrashesWithInformativeMessage()
75+
public void WorkingDirectoryWithoutGitFolderFailsWithInformativeMessage()
7676
{
77-
var results = GitVersionHelper.ExecuteIn(Environment.SystemDirectory, null, false);
78-
results.Output.ShouldContain("Can't find the .git directory in");
77+
var result = GitVersionHelper.ExecuteIn(Environment.SystemDirectory, null, false);
78+
79+
result.ExitCode.ShouldNotBe(0);
80+
result.Output.ShouldContain("Can't find the .git directory in");
7981
}
8082

8183
[Test]
82-
public void WorkingDirectoryDoesNotExistCrashesWithInformativeMessage()
84+
public void WorkingDirectoryDoesNotExistFailsWithInformativeMessage()
8385
{
8486
var workingDirectory = Path.Combine(PathHelper.GetCurrentDirectory(), Guid.NewGuid().ToString("N"));
8587
var executable = PathHelper.GetExecutable();

0 commit comments

Comments
 (0)