reinhardt-testkit
Core testing infrastructure for the Reinhardt framework.
Model-Derived Test Databases
TestDatabase creates an isolated database for tests and applies schema from
either Model metadata or application migrations.
Model-derived schemas preserve physical column names, defaults, generated columns, relationships and through tables, model constraints, and indexes so ORM behavior matches migration-backed databases.
use ;
async
Use the builder when a test needs migrations or integration options:
let db = builder
.
.with_di_context
.build
.await
.unwrap;
DI mock fixtures
reinhardt-testkit exposes three layers for mocking DI dependencies in tests:
with_di_overrides!macro (most ergonomic)DiOverrideBuilder+injection_context_with_di_overrides(closure form)injection_context_with_overrides(legacy; scope-seeding only)
use with_di_overrides;
use *;
async
See instructions/TESTING_STANDARDS.md (the TI- entry about with_di_overrides!) for the full rule set.