ruby on rails 3 - How to test with Rspec if an email is delivered -
I want to test that if an email is delivered, then I: Call with the administrator method. I'll use email_spec, so I tried snapping it here:
But that does not work, because I give an example of the delivery-style model object and the example is saved before delivery is.
I tried to make another example of model object, but then the ID is not the same.
My control method looks like this: Do you have an idea of how to fix it? Normally installed on your test environment (i.e., you have Config.action_mailer.delivery_method =: test ), then the distributed email global array as
ActionMailer :: Base.deliveries as the
mail :: message example You can read from the test case and make sure that the email is expected.
Comments
Post a Comment