https://github.com/kimond/factory_steel
A Rust fixture replacement greatly inspired by factory_bot and factory_boy.
https://github.com/kimond/factory_steel
factory rust
Last synced: 3 months ago
JSON representation
A Rust fixture replacement greatly inspired by factory_bot and factory_boy.
- Host: GitHub
- URL: https://github.com/kimond/factory_steel
- Owner: kimond
- License: mit
- Created: 2018-04-13T01:11:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-04T20:18:06.000Z (over 7 years ago)
- Last Synced: 2026-01-08T09:53:57.700Z (6 months ago)
- Topics: factory, rust
- Language: Rust
- Homepage:
- Size: 23.4 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Factory_Steel
[](https://travis-ci.org/kimond/factory_steel)
Factory_steel is a fixture replacement greatly inspired by [factory_bot](https://github.com/thoughtbot/factory_bot)
and [factory_boy](https://github.com/FactoryBoy/factory_boy). Currently it is an experimental project.
Although usable, it is still very limited in term of features and reliability.
## Getting started
Add this to your `Cargo.toml`:
```toml
[dependencies]
factory_steel = "0.1.0"
```
## Example
```rust
#[macro_use]
extern crate factory_steel;
use factory_steel::Factory;
#[derive(Factory)]
struct Post {
#[facto(default="New post")]
title: String,
}
fn main() {
let post = Post::create();
//Prints New post
println!("{}", post.title);
}
```
## Contributing
Contributions are welcome! This crate is work in progress, and a lot of work remains to be done.
Have a look at the [issues](https://github.com/kimond/factory_steel/issues), and
open a pull request if you'd like to add some functionality.