From 9c943e6730e2a725ba8a2d01c9474f541d6fb88a Mon Sep 17 00:00:00 2001 From: epwalsh Date: Thu, 18 Dec 2025 15:26:06 -0800 Subject: [PATCH] replace deprecated `cargo_bin` call --- tests/cli.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/cli.rs b/tests/cli.rs index 27b6064..6be3ad8 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -1,3 +1,4 @@ +use assert_cmd::cargo; use assert_cmd::prelude::*; // Add methods on commands use predicates::prelude::*; // Used for writing assertions use std::fs; @@ -8,7 +9,7 @@ use tempfile::tempdir; #[test] fn file_doesnt_exist() -> Result<(), Box> { - let mut cmd = Command::cargo_bin("cached-path")?; + let mut cmd = Command::new(cargo::cargo_bin("cached-path")); let cache_dir = tempdir().unwrap().path().to_owned(); cmd.arg("--dir") @@ -23,7 +24,7 @@ fn file_doesnt_exist() -> Result<(), Box> { #[test] fn test_remote_file() -> Result<(), Box> { - let mut cmd = Command::cargo_bin("cached-path")?; + let mut cmd = Command::new(cargo::cargo_bin("cached-path")); let cache_dir = tempdir().unwrap().path().to_owned(); cmd.arg("--dir") @@ -62,7 +63,7 @@ fn test_remote_file() -> Result<(), Box> { #[test] fn test_extract_remote_file() -> Result<(), Box> { - let mut cmd = Command::cargo_bin("cached-path")?; + let mut cmd = Command::new(cargo::cargo_bin("cached-path")); let cache_dir = tempdir().unwrap().path().to_owned(); cmd.arg("--dir") @@ -87,7 +88,7 @@ fn test_extract_remote_file() -> Result<(), Box> { #[test] fn test_extract_local_file() -> Result<(), Box> { - let mut cmd = Command::cargo_bin("cached-path")?; + let mut cmd = Command::new(cargo::cargo_bin("cached-path")); let cache_dir = tempdir().unwrap().path().to_owned(); cmd.arg("--dir")