Create helper functions for creating models in tests using factories

Create helper functions for creating models in tests using factories

For example:

  • invoice() to create an Invoice model
  • product() to create a Product model

We're writing a book, you can get it for free here.