Four Key Reasons to Learn Markdown
Back-End Leveling UpWriting documentation is fun—really, really fun. I know some engineers may disagree with me, but as a technical writer, creating quality documentation that will...
Here at Highgroove we often use the popular Factory Girl gem in our tests.
I also like to use a data generation library like Forgery in combination with Factory Girl.
Forgery allows me to improve my factories by using realistic instead of contrived data.
For example, here is a User factory without Forgery:
And here is the same factory with Forgery:
Now, each user created by the factory gets a realistic email address.
This becomes useful if you include Factory Girl and Forgery in the development group, in addition to the test group, in your Gemfile:
Now your factories are available from the Rails console in development mode.
Let’s say you want to spin up some records in your local development database so you can see a view fully populated with realistic data. From the console simply do:
Now you’ve got great looking data on screen for a demo, screencast, or perhaps some debugging.
What do you think? Is realistic data in your factories important to you?
Writing documentation is fun—really, really fun. I know some engineers may disagree with me, but as a technical writer, creating quality documentation that will...
Humanity has come a long way in its technological journey. We have reached the cusp of an age in which the concepts we have...
Go 1.18 has finally landed, and with it comes its own flavor of generics. In a previous post, we went over the accepted proposal and dove...