test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
```
-Each Rust source file in the `tests` directory is compiled as a separate crate. One
-way of sharing some code between integration tests is making a module with public
+Each Rust source file in the `tests` directory is compiled as a separate crate. In
+order to share some code between integration tests we can make a module with public
functions, importing and using it within tests.
-File `tests/common.rs`:
+File `tests/common/mod.rs`:
```rust,ignore
pub fn setup() {
}
```
-Modules with common code follow the ordinary [modules][mod] rules, so it's ok to
-create common module as `tests/common/mod.rs`.
+Creating the module as `tests/common.rs` also works, but is not recommended
+because the test runner will treat the file as a test crate and try to run tests
+inside it.
[unit]: unit_testing.md
[mod]: ../mod.md