Open
Description
Hey there,
I just started using this mail client, and it works like a charm! Thank you all for your hard work :)
One thing that really surprised me during integration testing is that the assertions are destructive. I.e., the following code works as expected when you've sent one e-mail.
# deliver email
Mail.deliver_later()
# email was delivered, so the inner assertion raises
assert_raise(ExUnit.AssertionError, fn -> assert_no_emails_delivered() end)
# however, now there are no more delivered emails, so this does not raise
assert_no_emails_delivered()
It would be nice if this behaviour was documented. Personally I believe that problems like ordering the assertions (see
#433) would not exist if the assertions would not be destructive. But that would be a breaking change :)
Thanks again for your hard work, let me know if you want me to prepare a pull request for the docs.
Best,
Kai