Skip to content

uninitialized constant ActionMailer::DeliveryJob with latest rails/master #2531

Closed
@mhenrixon

Description

@mhenrixon

What Ruby, Rails and RSpec versions are you using?

Ruby version: 3.0.2
Rails version: 7.0.0 @ a0e14a8bfebf5f4bd4b66d1d468c844ab3e9d704
RSpec version: 5.0.2

Observed behaviour

6) Pitches::AcceptRequest#call updates pitch status
     Failure/Error:
       expect { call }.to change { User.count }.by(1)
         .and change { BuyerProfile.count }.by(1)
         .and change { pitch.reload.buyer_profile }.from(nil)
         .and change { prospect.reload.invitation_accepted_at }.from(nil)
         .and have_enqueued_email(PitchMailer, :request_accepted)

     NameError:
       uninitialized constant ActionMailer::DeliveryJob
       Did you mean?  ActionMailer::MailDeliveryJob
     # ./spec/services/pitches/accept_request_spec.rb:36:in `block (3 levels) in <main>'
     # -e:1:in `<main>'

Expected behaviour

Test was working before upgrading rails version

Can you provide an example app?

https://github.com/mhenrixon/rspec-rails-issue-2531 shows the error nicely

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions