}
@Test
public void reportsTaskActionExecutionFailsWithError() {
TestFile buildFile = testFile("build.gradle");
buildFile.writelns("createTask('do-stuff')", "{", "1/0", "}");
<BUG>GradleExecutionFailure failure = usingBuildFile(buildFile).runTasksAndExpectFailure("do-stuff");
</BUG>
failure.assertHasFileName(String.format("Build file '%s'", buildFile));
failure.assertHasLineNumber(3);
failure.assertHasContext("Execution failed for task ':do-stuff'");

}
@Test
public void reportsTaskActionExecutionFailsWithError() {
TestFile buildFile = testFile("build.gradle");
buildFile.writelns("createTask('do-stuff')", "{", "1/0", "}");
ExecutionFailure failure = usingBuildFile(buildFile).withTasks("do-stuff").runWithFailure();
failure.assertHasFileName(String.format("Build file '%s'", buildFile));
failure.assertHasLineNumber(3);
failure.assertHasContext("Execution failed for task ':do-stuff'");
