(no title)
mnutt
|
2 months ago
I have a large rails app that was plagued with slow specs using factory_bot. Associations in factories are especially dangerous given how easy it is to build up big dependency chains. The single largest speedup was noting that nearly every test was in the context of a user and org, and creating a default_user and default_org fixture.
jrochkind1|2 months ago
Then you just refer to the fixture in your factory definitions? Seems very reasonable.
mijoharas|2 months ago
(now maybe that's what you used to see what was causing the slowdown, but mentioning to for others to help them identify the bottlenecks.)