0

I executed this command:

rails g mailer users/confirmations confirm_email

It generated this file at spec/fixtures/users/confirmations/confirm_email:

Users::Confirmations#confirm_email

Hi, find me in app/views/users/confirmations/confirm_email

What is this file for?

0

1 Answer 1

0

Mailer fixtures provide predefined data for testing, allowing you to test your mailers consistently with the same set of data. This ensures that your tests are repeatable and reliable.

By using fixtures, you can isolate the mailer tests from the rest of your application. This means that changes in other parts of your application will not affect the results of your mailer tests.

1
  • What about if I use dynamic data? Like translations, and tokens?
    – Chiara Ani
    Commented Jun 14 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.