#factory #derive #replace #fixture #factory-steel #factory-boy #greatly

macro factory_steel_derive

You should not use this crate directly, it is internal to Factory_steel

1 unstable release

Uses old Rust 2015

0.1.0 Apr 23, 2018

#20 in #fixture


Used in factory_steel

MIT license

8KB
210 lines

Factory_Steel

Build Status

Factory_steel is a fixture replacement greatly inspired by factory_bot and 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:

[dependencies]
factory_steel = "0.1.0"

Example

#[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, and open a pull request if you'd like to add some functionality.

Dependencies

~2MB
~47K SLoC