rspec / rspec-rails

RSpec for Rails 6+
https://rspec.info
MIT License
5.14k stars 1.03k forks source link

docs: Use `perform_enqueued_jobs` in an example code #2770

Closed toshimaru closed 1 week ago

toshimaru commented 1 week ago

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

pirj commented 1 week ago

Thanks!