rubyaustralia / melbourne-ruby

Organisers notes and processes
52 stars 5 forks source link

Fixtures vs Factories? When to use each? #168

Closed pinzonjulian closed 7 months ago

pinzonjulian commented 3 years ago

This is a topic I haven't been able to wrap my head around when creating a healthy test suite.

Fixtures seem to have been banned from the internet but I've seen big companies talking about how a combination of both can create a test suite that is both performant and easy to use.

What's the secret? What should be a fixture and what should be a factory?

It'd be awesome to see someone give a talk about this topic

map7 commented 3 years ago

Here is a blog post which I found which might answer some of these questions (or raise more questions) https://blog.quantic.edu/2015/01/28/fixturies-the-speed-of-fixtures-and-the-maintainability-of-factories/

pinzonjulian commented 3 years ago

Thanks for the post @map7 ! I still have a ton of questions though 😂

optimistic-updt commented 1 year ago

@pinzonjulian Where do you sit with this these days? can you now do a talk about it :P

pinzonjulian commented 1 year ago

@optimistic-updt Still confused 😂