use assert_cmd::Command;
use predicates::prelude::*;
use std::fs;
use tempfile::TempDir;

{% for verb in noun.verbs -%}
#[test]
fn test_{{ noun.name }}_{{ verb.name }}() {
    let temp_dir = TempDir::new().unwrap();
    let mut cmd = Command::cargo_bin("{{ project.name }}").unwrap();

    cmd.arg("{{ noun.name }}")
        .arg("{{ verb.name }}")
        {% for arg in verb.arguments -%}
        {% if arg.position is defined -%}
        .arg("test-{{ arg.name }}")
        {% endif -%}
        {% endfor -%}
        .assert()
        .success();
}

{% endfor %}
