Video: Refactoring to Test Data Builders
Originally published on . Last updated on .
As you may know, I code live on Twitch whenever I can. I generally work on real-world projects, such as my Ensemble Programming Registration System (aka MobReg). I do this for many reasons, one of which is to show folks what it looks like to do test-driven development on a small, but real-world codebase (mistakes and all). I also enjoy chatting with my viewers, and getting feedback and suggestions while I’m coding.
I recently took the time to refactor some test code, as the setup sections of tests were starting to get verbose and awkward. This video is an excerpt from my stream, where I create a test data builder for the
Member object. While the video is unedited, I hope you find it useful. If you’d like to see more of these excerpts, let me know on Twitter or Discord.