Closed
Description
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