Any suggestions for implementing factories?
Closed this issue · 3 comments
FarhadG commented
We're currently using a mock data
solution where we're testing against a set of data points, however, it's getting quite difficult to manage and I was wondering if we have any good solutions or suggestions for implementing factories
where we create the test data on the fly (or any other viable solutions).
cressie176 commented
I usually roll my own solution using a combination of the builder and Object Mother patterns. I'm always careful to generate random values for anything I'm not asserting. I've found chance quite useful for this.
FarhadG commented
Thanks for the response, @cressie176. Would you happen to have any code I can look at in regards to Yadda?
cressie176 commented
No sorry.