How to Write Integration Tests in Rust

Write Rust integration tests by creating files in the `tests` directory and running them with `cargo test`.

Write integration tests in Rust by placing test files in a tests directory at the root of your crate and using the #[test] attribute with #[cfg(test)] modules.

// tests/integration_test.rs
use my_crate::add; // Replace 'my_crate' with your actual crate name

#[test]
fn test_add() {
    assert_eq!(4, add(2, 2));
}

Run them with cargo test --test integration_test.