Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ public GivenDotnetRunThrowsAParseError(ITestOutputHelper log) : base(log)
[Fact]
public void ItFailsWithAnAppropriateErrorMessage()
{
// Use a dedicated empty directory to ensure no stray files are picked up from other tests.
Comment thread
MichaelSimons marked this conversation as resolved.
Outdated
var emptyDir = TestAssetsManager.CreateTestDirectory().Path;

new DotnetCommand(Log, "run")
// executing in a known path, with no project, is a sure way to get run to throw a parse error
.WithWorkingDirectory(Path.GetTempPath())
.WithWorkingDirectory(emptyDir)
.Execute("--", "1")
.Should().Fail()
.And.HaveStdErrContainingOnce("Couldn't find a project to run.");
Expand Down
Loading