import yaml


def make_rushfile(make_tmpdir):
    """Creating dummy rushfile.yml."""

    # dummy rushfile path
    tmp_dir, tmp_path = make_tmpdir

    # dummy rushfile contents
    content = """task_1: |
    echo "task1 is running"

    task_2: |
        # Task chaining [task_1 is a dependency of task_2]
        task_1
        echo "task2 is running"
    """

    # loading dummy rushfile
    yml_content = yaml.load(content, Loader=yaml.FullLoader)

    # saving dummy rushfile to tmp dir
    with open(tmp_path, "w") as f:
        yaml.dump(yml_content, f)

    return yml_content