From b996a7ecec4bb22a28bce3b86f68fe51b4409287 Mon Sep 17 00:00:00 2001 From: Freyskeyd Date: Wed, 4 Jan 2017 16:02:34 +0100 Subject: [PATCH] Fix doc cfg(test) and tests directory Signed-off-by: Freyskeyd --- src/doc/book/testing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/doc/book/testing.md b/src/doc/book/testing.md index 96cec7295aa9d..6fefa1c9f1e1c 100644 --- a/src/doc/book/testing.md +++ b/src/doc/book/testing.md @@ -499,6 +499,10 @@ be imported in every test with `mod common;` That's all there is to the `tests` directory. The `tests` module isn't needed here, since the whole thing is focused on tests. +Note, when building integration tests, cargo will not pass the `test` attribute +to the compiler. It means that all parts in `cfg(test)` won't be included in +the build used in your integration tests. + Let's finally check out that third section: documentation tests. # Documentation tests