Skip to content

Commit ff7c234

Browse files
author
Joel Lubrano
committed
Make 'deliver_now' a frozen constant
1 parent 9474245 commit ff7c234

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rspec/rails/matchers/have_enqueued_mail.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ module Matchers
1010
# @private
1111
# @see RSpec::Rails::Matchers#have_enqueued_mail
1212
class HaveEnqueuedMail < ActiveJob::HaveEnqueuedJob
13+
MAILER_JOB_METHOD = 'deliver_now'.freeze
14+
1315
include RSpec::Mocks::ExampleMethods
1416

1517
def initialize(mailer_class, method_name)
@@ -81,7 +83,7 @@ def mailer_args
8183
end
8284

8385
def base_mailer_args
84-
[@mailer_class.name, @method_name.to_s, 'deliver_now']
86+
[@mailer_class.name, @method_name.to_s, MAILER_JOB_METHOD]
8587
end
8688

8789
def check_active_job_adapter

0 commit comments

Comments
 (0)