77//! hide the auxiliary utilities your tests make use of somewhere else.
88//! For instance, if you have an application that has many tests with users, shopping baskets, and
99//! products, you'd have to create a user, a shopping basket, and product every single time in
10- //! every test which becomes unwieldy quickly. In order to cut down on that repetition, you can
10+ //! every test which becomes unwieldy quickly. To cut down on that repetition, you can
1111//! instead use fixtures to declare that you need those objects for your function and the fixtures
1212//! will take care of creating those by themselves. Focus on the important stuff in your tests!
1313//!
2121//!
2222//! - [`[rstest]`](macro@rstest): Declare that a test or a group of tests that may take
2323//! [fixtures](attr.rstest.html#injecting-fixtures),
24- //! [input table](attr.rstest.html#test-parametrized-cases) or
25- //! [list of values](attr.rstest.html#values-lists).
24+ //! [input table](attr.rstest.html#test-parametrized-cases),
25+ //! [list of values](attr.rstest.html#values-lists) or read data from
26+ //! [files](attr.rstest.html#files-path-as-input-arguments).
2627//! - [`[fixture]`](macro@fixture): To mark a function as a fixture.
2728//!
2829//! ## Why
9394//! assert!(string_processor.output.contains("Alice"));
9495//! }
9596//! ```
96- //! ### Features
97+ //! ## Features
9798//!
9899//! - `async-timeout`: `timeout` for `async` tests (Default enabled)
99100//! - `crate-name`: Import `rstest` package with different name (Default enabled)
232233//! ```
233234//! You can use this feature also in value list and in fixture default value.
234235//!
235- //! # Optional features
236- //!
237- //! `rstest` Enable all features by default. You can disable them if you need to
238- //! speed up compilation.
239- //!
240- //! - **`async-timeout`** *(enabled by default)* — Implement timeout for async
241- //! tests.
242- //!
243- //! # Rust version compatibility
244- //!
245- //! The minimum supported Rust version is 1.67.1.
246- //!
247236
248237#[ doc( hidden) ]
249238pub mod magic_conversion;
@@ -584,7 +573,7 @@ pub use rstest_macros::fixture;
584573/// The attribute that you should use for your tests. Your
585574/// annotated function's arguments can be
586575/// [injected](attr.rstest.html#injecting-fixtures) with
587- /// [`[ fixture] `](macro@fixture)s, provided by
576+ /// [`fixture`](macro@fixture)s, provided by
588577/// [parametrized cases](attr.rstest.html#test-parametrized-cases)
589578/// or by [value lists](attr.rstest.html#values-lists).
590579///
@@ -608,6 +597,7 @@ pub use rstest_macros::fixture;
608597/// - [inject fixtures](#injecting-fixtures)
609598/// - Generate [parametrized test cases](#test-parametrized-cases)
610599/// - Generate tests for each combination of [value lists](#values-lists)
600+ /// - Feed variables from [files](#files-path-as-input-arguments)
611601///
612602/// Additional Attributes:
613603///
@@ -1246,9 +1236,6 @@ pub use rstest_macros::fixture;
12461236/// }
12471237/// ```
12481238///
1249- /// When using an explicit test attribute, ensure it appears after any `#[case()]` attributes so that the attribute binds
1250- /// to the test function and not the case.
1251- ///
12521239/// ### Implicit Test Attributes
12531240///
12541241/// If your test contains an attribute whose path ends in `test`, this is treated
@@ -1275,9 +1262,6 @@ pub use rstest_macros::fixture;
12751262/// If you have an unrelated attribute whose path ends in `test`, you should declare an explicit test attribute
12761263/// for deconfliction.
12771264///
1278- /// When using an implicit test attribute, ensure it appears after any `#[case()]` attributes so that the attribute binds to the
1279- /// test function and not the case.
1280- ///
12811265/// ### Default Test Attributes
12821266///
12831267/// Synchronous tests use `#[test]` as the default test attribute if nothing else is supplied explicitly or implicitly.
@@ -1286,7 +1270,7 @@ pub use rstest_macros::fixture;
12861270///
12871271/// ## Test `Context` object
12881272///
1289- /// You can have a [`Context`] object for your test just by annotate an argument by `#[context]` attribute.
1273+ /// You can have a [`Context`] object for your test by annotating an argument by `#[context]` attribute.
12901274/// This object contains some useful information both to implement simple logics and debugging stuff.
12911275///
12921276/// ```
0 commit comments