@@ -225,8 +225,7 @@ fn install_path() {
225225
226226 cargo_process ( "install --path" ) . arg ( p. root ( ) ) . run ( ) ;
227227 assert_has_installed_exe ( cargo_home ( ) , "foo" ) ;
228- cargo_process ( "install --path ." )
229- . cwd ( p. root ( ) )
228+ p. cargo ( "install --path ." )
230229 . with_status ( 101 )
231230 . with_stderr (
232231 "\
@@ -692,8 +691,7 @@ fn subcommand_works_out_of_the_box() {
692691fn installs_from_cwd_by_default ( ) {
693692 let p = project ( ) . file ( "src/main.rs" , "fn main() {}" ) . build ( ) ;
694693
695- cargo_process ( "install" )
696- . cwd ( p. root ( ) )
694+ p. cargo ( "install" )
697695 . with_stderr_contains (
698696 "warning: Using `cargo install` to install the binaries for the \
699697 project in current working directory is deprecated, \
@@ -725,8 +723,7 @@ fn installs_from_cwd_with_2018_warnings() {
725723 ) . file ( "src/main.rs" , "fn main() {}" )
726724 . build ( ) ;
727725
728- cargo_process ( "install" )
729- . cwd ( p. root ( ) )
726+ p. cargo ( "install" )
730727 . masquerade_as_nightly_cargo ( )
731728 . with_status ( 101 )
732729 . with_stderr_contains (
@@ -1243,15 +1240,6 @@ fn install_ignores_cargo_config() {
12431240 pkg ( "bar" , "0.0.1" ) ;
12441241
12451242 let p = project ( )
1246- . file (
1247- "Cargo.toml" ,
1248- r#"
1249- [package]
1250- name = "foo"
1251- version = "0.1.0"
1252- authors = []
1253- "# ,
1254- )
12551243 . file (
12561244 ".cargo/config" ,
12571245 r#"
@@ -1262,6 +1250,6 @@ fn install_ignores_cargo_config() {
12621250 . file ( "src/main.rs" , "fn main() {}" )
12631251 . build ( ) ;
12641252
1265- cargo_process ( "install bar" ) . cwd ( p . root ( ) ) . with_status ( 0 ) . run ( ) ;
1253+ p . cargo ( "install bar" ) . run ( ) ;
12661254 assert_has_installed_exe ( cargo_home ( ) , "bar" ) ;
12671255}
0 commit comments