mod testsupport;
use assert_cmd::cargo_bin_cmd;
use std::path::Path;
use tempfile::TempDir;
#[tokio::test]
async fn can_init() {
testsupport::require_acceptance_testing_enabled!();
let tempdir = TempDir::new().expect("failed to create temp dir");
let workspace = tempdir.path().join("my-app");
std::fs::create_dir_all(&workspace).expect("Expected to create temp dir for workspace");
let auric_cli_path = Path::new(env!("CARGO_MANIFEST_DIR"));
let auric_workspace_path = auric_cli_path
.join("../..")
.canonicalize()
.expect("Expected to get absolute workspace path");
let mut cmd = cargo_bin_cmd!("auric");
cmd.arg("init")
.arg("--auricWorkspace")
.arg(auric_workspace_path)
.current_dir(workspace)
.assert()
.success();
}