Skip to content

Commit fdfbba0

Browse files
committed
Provide the now required response object to the smtp exception
mail gem 2.8.0 added ruby 3.1 support[1] which added net-smtp as an explicit gem dependency because it had recently become an extracted gem. Previously, we used the ruby stdlib version, which was using gem version 0.1.0 in ruby 2.7.0 and 0.2.1 in ruby 3.0.0. Starting with net-smtp 0.2.2, the Net::SMTPError types now require a response object [2] and an optional message. 🤷 [1] https://github.com/mikel/mail/pull/1472/files [2] https://github.com/ruby/net-smtp/pull/26/files
1 parent dc240dc commit fdfbba0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/mailers/generic_mailer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# raises error when delivered
4949
msg = @args.merge(:to => '[email protected], [email protected]')
5050
notification = GenericMailer.generic_notification(msg)
51-
allow(notification).to receive(:deliver_now).and_raise(Net::SMTPFatalError)
51+
allow(notification).to receive(:deliver_now).and_raise(Net::SMTPFatalError.new("fake_response"))
5252

5353
# send error msg first...
5454
expect(GenericMailer)

0 commit comments

Comments
 (0)