bintest_helper 0.1.0

Rebuild your binary when unit-testing with e.g. assert_cmd
Documentation

Bintest Helper

Use this in combination with assert_cmd. Example:

fn main() {
    println!("Hello, World!");
}

#[cfg(test)]
mod tests {
    #[bintest_helper::bintest_helper]
    #[test]
    fn main_test() {
        use assert_cmd::Command;

        let mut cmd = Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
        cmd.assert().stdout("Hello, World!");
    }
}

See also: the examples directory.