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

docs: Use perform_enqueued_jobs in an example code #2770

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

toshimaru
Copy link
Contributor

I think perform_jobs should be perform_enqueued_jobs,
so I fixed the documentation.

  test "account is charged" do
    perform_enqueued_jobs do
      BillingJob.perform_later(account, product)
    end
    assert account.reload.charged_for?(product)
  end

ref. Testing Rails Applications — Ruby on Rails Guides

`perform_jobs` should be `perform_enqueued_jobs`,
so I fix the example codes.

ref. https://guides.rubyonrails.org/testing.html#testing-jobs-in-isolation
@pirj pirj merged commit 591ef0b into rspec:main Jun 22, 2024
17 checks passed
@pirj
Copy link
Member

pirj commented Jun 22, 2024

Thanks!

@toshimaru toshimaru deleted the use-perform_enqueued_jobs branch June 22, 2024 09:12
JonRowe pushed a commit that referenced this pull request Jun 24, 2024
docs: Use `perform_enqueued_jobs` in an example code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants