rust-cli / team

CLI working group
https://rust-cli.github.io/book
MIT License
294 stars 34 forks source link

Update assert_cmd testing examples to use cargo_bin() #160

Closed mogenson closed 4 years ago

mogenson commented 4 years ago

As of version 0.11.0, the assert_cmd crate has dropped the main_binary() function in favor of cargo_bin() that takes the name of the cargo binary. Update the testing chapter of the book to use cargo_bin("grrs") with the binary name hard coded. Another option would be to use cargo_bin(env!("CARGO_PKG_NAME")) if you briefly wanted to explain cargo's environmental variables and the env!() macro.

Dylan-DPC-zz commented 4 years ago

Thanks