Skip to main content

rskit_testutil/
lib.rs

1//! Test utilities, mock providers, and assertion helpers.
2//!
3//! Designed for use in `#[cfg(test)]` blocks and integration tests across the rskit ecosystem.
4//!
5//! [`TestWorkspace`] is the generic fixture harness.
6//! Configure any fixture root with [`TestWorkspace::with_fixture_dir`],
7//! or use [`test_workspace!`] for the conventional `<crate>/tests/fixtures` layout.
8//!
9#![warn(missing_docs)]
10
11/// Assertion helpers for `AppResult`.
12pub mod assertions;
13/// Fake components for lifecycle tests.
14pub mod component;
15/// Test config helpers.
16pub mod config;
17/// Process working-directory guard for tests.
18pub mod current_dir;
19/// Golden/snapshot verification: normalization, matcher tiers, bless.
20pub mod golden;
21/// Hook and event-bus test helpers.
22pub mod hook;
23/// Generic mock provider for testing.
24pub mod mock_provider;
25/// Temporary workspace and fixture helpers.
26pub mod workspace;
27
28pub use assertions::{assert_err_code, assert_ok};
29pub use component::FakeComponent;
30pub use config::TestAppConfig;
31pub use current_dir::CurrentDirGuard;
32pub use golden::{BLESS_ENV, Golden, GoldenMode, GoldenOutcome, Match, Normalizer, Rule};
33pub use hook::TestEvent;
34pub use mock_provider::MockProvider;
35pub use workspace::TestWorkspace;
36
37mod concurrency;
38mod macros;
39
40pub use concurrency::CONCURRENCY_TEST_NOTE;