Skip to content
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

Add compatibility for have_enqueued_mail (rails 7) #2537

Closed
wants to merge 1 commit into from

Conversation

mhenrixon
Copy link
Contributor

  1. ActionMailer::DeliveryJob does not exist anymore
  2. ActionMailer::Parameterized::DeliveryJob

According to my research they have both been superseeded by ActionMailer::MailDeliveryJob

Closes #2531

@pirj
Copy link
Member

pirj commented Nov 23, 2021

I've started incorporating your fix, but failed to do so. I hope you'll find this part useful to get specs to green.

@mhenrixon
Copy link
Contributor Author

Thank you, that's super helpful. I'll see about running the tests locally. Will try to finish it up in a bit.

1. ActionMailer::DeliveryJob does not exist anymore
2. ActionMailer::Parameterized::DeliveryJob

According to my research they have both been superseeded by ActionMailer::MailDeliveryJob

Closes rspec#2531
@mhenrixon
Copy link
Contributor Author

Seems the tests passed? You have a pretty complex setup but I remove the commit I used to test everything @pirj , let me know if anything else is needed.

@pirj
Copy link
Member

pirj commented Nov 24, 2021

Please don't be deceived by the green status of Rails: main builds in the status checks box. Those builds are marked as allow_failures: true and appear as green even when builds fail. I'm

https://github.com/rspec/rspec-rails/runs/4309351309?check_suite_focus=true

 Failures:

  1) HaveEnqueuedMail matchers have_enqueued_mail passes for mailer methods with default arguments
     Failure/Error:
       expect {
         TestMailer.email_with_optional_args('required').deliver_later
       }.to have_enqueued_mail(TestMailer, :email_with_optional_args).with('required')

       expected to enqueue TestMailer.email_with_optional_args exactly 1 time with ["required"], but enqueued 0
       Queued deliveries:
         TestMailer.email_with_optional_args with [{"args"=>["required"], "_aj_ruby2_keywords"=>["args"]}]

That's basically the same failure I choked on when integrated your fix.

@mhenrixon
Copy link
Contributor Author

Oh man, you have a complex setup. I was indeed super happy that everything was (not passing) lol. Let me try and run the tests locally so that I can debug.

@pirj
Copy link
Member

pirj commented Dec 7, 2021

Have you had a chance to check the failure, @mhenrixon ?

@mhenrixon
Copy link
Contributor Author

Have you had a chance to check the failure, @mhenrixon ?

I have tried and failed @pirj, I am moving my family in a few days and likely won't have time to sit down with this until after Christmas.

@pirj
Copy link
Member

pirj commented Dec 8, 2021

No worries, take your time and have a great holiday. I might have a chance to try to tweak the PR earlier.

@pirj
Copy link
Member

pirj commented Jan 10, 2022

Fixed in #2546. Thanks for your contribuion, @mhenrixon !

@pirj pirj closed this Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uninitialized constant ActionMailer::DeliveryJob with latest rails/master
2 participants