mercredi 8 juillet 2015

How to generate fixtures for testing Rails ActionMailer

I am thinking quite a time about how to do TDD using fixtures with ActionMailer. The main Problem is how to generate the fixtures. I want to cover the following scenarios:

  1. Receiving of Plain Text Mail
  2. Receiving of HTML Mail
  3. Receiving of Mail with Plain Text and HTML
  4. Receiving of Mail with Attachments

Another relating question is: If I've generated the fixtures I want can I just pass the content of them into the corresponding mailers receive method?

Aucun commentaire:

Enregistrer un commentaire