fn dep_output_dir_is_file() {
    let root_test_dir = test_setup::create_root_dir("dep_output_dir_is_file");
    let test_proj_dir = test_setup::create_dir(root_test_dir, "proj");
    let test_proj_deps_dir =
        test_setup::create_dir(test_proj_dir.clone(), "deps");
    fs::write(test_proj_deps_dir + "/my_scripts", "")
        .expect("couldn't write dummy target file");
    let deps_file_conts = indoc!{"
        deps

        my_scripts git git://localhost/my_scripts.git master
    "};
    fs::write(test_proj_dir.to_string() + "/dpnd.txt", &deps_file_conts)
        .expect("couldn't write dependency file");
    let mut cmd = test_setup::new_test_cmd(test_proj_dir);

    let cmd_result = cmd.assert();

    cmd_result
        .code(1)
        .stdout("")
        .stderr(
            "Couldn't remove 'deps/my_scripts', the output directory for the \
             'my_scripts' dependency: Not a directory (os error 20)\n",
        );
}
// Given the output directory for a dependency is a file
// When the command is run
// Then the command fails with an error
Given the output directory for a dependency is a file
When the command is run
Then the command fails with an error
Given the output directory for a dependency is a file When the command is run Then the command fails with an error
fn dep_output_dir_is_file() {
    let root_test_dir = test_setup::create_root_dir("dep_output_dir_is_file");
    let test_proj_dir = test_setup::create_dir(root_test_dir, "proj");
    let test_proj_deps_dir =
        test_setup::create_dir(test_proj_dir.clone(), "deps");
    fs::write(test_proj_deps_dir + "/my_scripts", "")
        .expect("couldn't write dummy target file");
    let deps_file_conts = indoc!{"
        deps
        my_scripts git git://localhost/my_scripts.git master
    "};
    fs::write(test_proj_dir.to_string() + "/dpnd.txt", &deps_file_conts)
        .expect("couldn't write dependency file");
    let mut cmd = test_setup::new_test_cmd(test_proj_dir);
    let cmd_result = cmd.assert();
    cmd_result
        .code(1)
        .stdout("")
        .stderr(
            "Couldn't remove 'deps/my_scripts', the output directory for the \
             'my_scripts' dependency: Not a directory (os error 20)\n",
        );
}
fn dep_output_dir_is_file ( ) { let root_test_dir = test_setup :: create_root_dir ( " " ) ; let test_proj_dir = test_setup :: create_dir ( root_test_dir , " " ) ; let test_proj_deps_dir = test_setup :: create_dir ( test_proj_dir . clone ( ) , " " ) ; fs :: write ( test_proj_deps_dir + " " , " " ) . expect ( " " ) ; let deps_file_conts = indoc ! { " " } ; fs :: write ( test_proj_dir . to_string ( ) + " " , & deps_file_conts ) . expect ( " " ) ; let mut cmd = test_setup :: new_test_cmd ( test_proj_dir ) ; let cmd_result = cmd . assert ( ) ; cmd_result . code ( 1 ) . stdout ( " " ) . stderr ( " \
 \n " , ) ; }
Given the output directory for a dependency is a file
When the command is run
Then the command fails with an error
Given the output directory for a dependency is a file When the command is run Then the command fails with an error