add assert_cmd to test binaries
This commit is contained in:
@@ -16,3 +16,4 @@ harmony_macros = { path = "../../harmony_macros" }
|
||||
log = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
url = { workspace = true }
|
||||
assert_cmd = "2.0.16"
|
||||
|
||||
@@ -18,3 +18,13 @@ async fn main() {
|
||||
]);
|
||||
harmony_cli::init(maestro).await.unwrap();
|
||||
}
|
||||
|
||||
use assert_cmd::Command;
|
||||
|
||||
#[test]
|
||||
fn test_example() {
|
||||
let mut cmd = Command::cargo_bin("example-cli").unwrap();
|
||||
let assert = cmd.arg("--run").arg("SuccessScore").assert();
|
||||
|
||||
assert.success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user