Fork me on GitHub

Just discovered facai, cool project! I’ve also been in the hammock about database fixture generation, and since the library doesn’t have it’s own channel, I hope it’s alright to post some thoughts in here. I’ve worked a fair amount with both specmonstah and python’s factory boy, and I like how facai is inspired by the best parts in both. Factory boy makes it easy to get started and do simple things, but once you have complex needs it can feel like you’re working in a restrictive DSL. Specmonstah is vastly more powerful, but also vastly more complex to set up. I’ve also run into problems where specmonstah’s entity minimization approach ends up forcing me to specify every entity in my query, which is unpleasant. WRT the, I wonder how much of the need for that (and traits in general, and :inherits) would be obviated by making factories themselves data. Then you could write functions that manipulate that data however you pleased.