@Test
public void canDetermineRootProjectAndDefaultProjectBasedOnBuildFile() {
testFile("settings.gradle").write("include('child')");
TestFile rootBuildFile = testFile("build.gradle");
rootBuildFile.write("task('do-stuff')");
TestFile childBuildFile = testFile("child/build.gradle");
childBuildFile.write("task('do-stuff')");
usingBuildFile(rootBuildFile).withSearchUpwards().withTasks("do-stuff").run().assertTasksExecuted(":do-stuff", ":child:do-stuff");
usingBuildFile(rootBuildFile).withSearchUpwards().withTasks(":do-stuff").run().assertTasksExecuted(":do-stuff");
usingBuildFile(childBuildFile).withSearchUpwards().withTasks("do-stuff").run().assertTasksExecuted(":child:do-stuff");