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

5-2-stable: Fix docs of assert_enqueued_email_with [ci skip] #33259

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 2 additions & 15 deletions actionmailer/lib/action_mailer/test_helper.rb
Expand Up @@ -60,7 +60,7 @@ def assert_emails(number)
#
# Note: This assertion is simply a shortcut for:
#
# assert_emails 0
# assert_emails 0, &block
def assert_no_emails(&block)
assert_emails 0, &block
end
Expand Down Expand Up @@ -93,20 +93,7 @@ def assert_enqueued_emails(number, &block)
assert_enqueued_jobs number, only: [ ActionMailer::DeliveryJob, ActionMailer::Parameterized::DeliveryJob ], &block
end

# Asserts that a specific email has been enqueued, optionally
# matching arguments.
#
# def test_email
# ContactMailer.welcome.deliver_later
# assert_enqueued_email_with ContactMailer, :welcome
# end
#
# def test_email_with_arguments
# ContactMailer.welcome("Hello", "Goodbye").deliver_later
# assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"]
# end
#
# If a block is passed, that block should cause the specified email
# Asserts that block should cause the specified email
# to be enqueued.
#
# def test_email_in_block
Expand Down