Factori
A testing factory library for Rust, inspired by FactoryBot. 🤖 🦀
Factori makes it easy to instantiate your test objects/fixtures in tests while providing an ergonomic syntax for defining how they are instantiated.
Factori works on stable Rust >=1.30.
Documentation
See API documentation.
Example
Factori provides two macros: factori!
, which defines a factory for a type,
and create!
which instantiates it:
extern crate factori;
factori!;
More examples are available in the
tests/
directory.
Testing
Run:
License
MIT