Files
weevil/tests/integration.rs
Eric Ratliff d2cc62e32f feat: Add integration test suite for v1.1.0 commands
Adds WEEVIL_HOME-based test isolation so cargo test never touches
the real system. All commands run against a fresh TempDir per test.

Environment tests cover doctor, uninstall, new, and setup across
every combination of missing/present dependencies. Project lifecycle
tests cover creation, config persistence, upgrade, and build scripts.

Full round-trip lifecycle test: new → gradlew test → gradlew
compileJava → uninstall → doctor (unhealthy) → setup → doctor
(healthy). Confirms skeleton projects build and pass tests out of
the box, and that uninstall leaves user projects untouched.

34 tests, zero warnings.
2026-01-31 13:56:01 -06:00

39 lines
967 B
Rust

use assert_cmd::prelude::*;
use predicates::prelude::*;
use std::process::Command;
#[path = "integration/environment_tests.rs"]
mod environment_tests;
#[path = "integration/project_lifecycle_tests.rs"]
mod project_lifecycle_tests;
#[test]
fn test_help_command() {
let mut cmd = Command::new(assert_cmd::cargo::cargo_bin!("weevil"));
cmd.arg("--help");
cmd.assert()
.success()
.stdout(predicate::str::contains("FTC robotics project generator"));
}
#[test]
fn test_version_command() {
let mut cmd = Command::new(assert_cmd::cargo::cargo_bin!("weevil"));
cmd.arg("--version");
cmd.assert()
.success()
.stdout(predicate::str::contains("1.0.0"));
}
#[test]
fn test_sdk_status_command() {
let mut cmd = Command::new(assert_cmd::cargo::cargo_bin!("weevil"));
cmd.arg("sdk").arg("status");
cmd.assert()
.success()
.stdout(predicate::str::contains("SDK Configuration"));
}