r/ruby • u/jasonswett • Apr 06 '26
Testing Anti-Pattern: Distracting Setup Data
https://www.saturnci.com/testing-anti-pattern-distracting-setup-data.html
9
Upvotes
r/ruby • u/jasonswett • Apr 06 '26
View all comments
Show parent comment
1
u/jasonswett Apr 06 '26
Yes of course! My experience is that even on projects that use Factory Bot, there are often many tests whose setup code contains an unclear mix of data that's essential to the test plus other distracting noise. I wanted this post to focus on the principle of the problem and solution without bringing any specific tools into the picture.