Build Dummy Data with Relationships
Too Long; Didn't Read
We’ve all been there. You’re building a rails app that has a large dataset and you plan for the app to run analytics on the <a href="https://hackernoon.com/tagged/dataset" target="_blank">dataset</a>. If you’re following the Test Driven <a href="https://hackernoon.com/tagged/design" target="_blank">Design</a> (TDD) model then you’re going to need to test your analytics methods. The problem is, your dataset is too large to upload in your test suite. You could always copy the first 500 or so lines for a test fixture, but that always ends up producing weird results. What you really need is a little more control over what that test dataset looks like. Let’s start with an example: