-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: have_enqueued_email matcher to deal with ActionMailer::DeliveryJob #1901
Comments
This sounds like the perfect excuse to write a little extension gem |
Hey, not sure if this is helpful or too late, but I have made gem that provides a matcher for GitHub: https://github.com/jdlubrano/deliver_later_matchers |
This can be done with a matcher. Please look at #1849 (comment) @JonRowe do you think we should close this issue? |
No, I feel as we have enqueued job matchers, and ActiveMailer uses active job, this is something we should consider, @jdlubrano would you care to submit a PR with your changes rolled into ours? |
Thank you for reaching out; I would be delighted to submit a PR. Have you had a chance to look at the deliver_later_matchers gem's API? Do you want to use the same API in rspec-rails or did you have something else in mind? |
Yes I have, it looks very similar to our job matchers on the outside and inside, it would be great to leverage our existing job innards if possible (legitimate case for inheritance woo!) Personally I would make |
I use a lot the
have_enqueued_job
matcher because I like its syntax and it also perform params serialization that allows me to catch invalid arguments given to background jobs such as symbol serialization.However I think that it's a little bit too verbose when used with
ActionMailer::DeliveryJob
e.g.It would be very nice to have a specialized wrapper around it, something like this
What do you think?
The text was updated successfully, but these errors were encountered: