RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Testing Background Jobs with Minitest Rails

https://minitestrails.com/guide/testing-background-jobs/

Chapter 15 of the Minitest Rails guide is out now. Learn how to test background jobs by building a feature to export records to a file:

  • Queue mailers with deliver_later
  • Test that background jobs are enqueued in Integration Tests
  • Test job behavior with perform_now in Job tests
  • Discard background job if the user is deleted before the job runs
  • Use Turbo Streams to notify the user when background work is complete
  • Test the final browser flow with a small system smoke test

This chapter is sponsored by Deccan Queen on Rails. It is a community-first Rails conference happening in Pune (India) from 8 to 11 October 2026. Single track talks, hallway conversations, and chai with Rubyists from India and abroad.

Grab your pass if you are around, it’s going to be a lot of fun: https://deccanqueenonrails.com/?utm_source=minitestrails.com

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in