@Override
    public String arguments() {
        ArrayList<String> args = new ArrayList<>();
        if (buildFile != null) {
            args.add("-f \"" + FilenameUtils.separatorsToUnix(buildFile) + "\"");
        }

        if (target != null) {
            args.add(target);
        }

        return StringUtils.join(args, " ");
    }
@Test
    public void shouldUseRakeFileFromAnyDirectoryUnderRoot() throws Exception {
        RakeTask rakeTask = new RakeTask();
        String rakeFile = "build/myrakefile.rb";

        rakeTask.setBuildFile(rakeFile);
        rakeTask.setTarget("db:migrate VERSION=0");
        assertThat(rakeTask.arguments(), is("-f \"" + rakeFile + "\" db:migrate VERSION=0"));
    }