RepoJournal
Rails

@rails

Ruby on Rails - Shopify, Basecamp, GitHub all run on it

Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: Ruby Full archive →

The Wire · Showcase

ACTION MAILER TEST ASSERTIONS FIXED FOR NESTED ATTACHMENTS

By RepoJournal · Filed · About Rails

1 person shipped this

The assert_part and assert_no_part helpers can now see body parts buried inside multipart/alternative containers when attachments are present.

Rails shipped a critical fix [1] to ActionMailer's test assertions that were silently missing nested body parts in messages with both text and HTML bodies alongside attachments. The bug lived in assert_part and assert_no_part [2], which only inspected top-level Mail#parts and couldn't see body parts wrapped in multipart/alternative containers nested below the top-level multipart/mixed part. This broke email testing for the most common real-world scenario: a message with both plain text and HTML versions plus an attachment. The fix [3] changes the assertion logic to traverse the full MIME tree instead of stopping at the surface. If you've written ActionMailer tests since 8.2.0.alpha, your assertions may have been passing falsely - upgrade immediately to catch real failures.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] Fix assert_part/assert_no_part for body parts nested under an attachment rails/rails
  2. [2] Fix `assert_part` / `assert_no_part` for body parts nested under an attachment ↗ rails/rails
  3. [3] Merge pull request #57521 from 55728/fix-assert-part-nested-multipart rails/rails

Quick answers

What shipped in Rails on June 1, 2026?
The assert_part and assert_no_part helpers can now see body parts buried inside multipart/alternative containers when attachments are present. In total, 6 commits and 3 pull requests landed.
Who contributed to Rails on June 1, 2026?
1 developer shipped this update, including 55728.
What were the notable Rails updates?
Fix assert_part/assert_no_part for body parts nested under an attachment, Fix `assert_part` / `assert_no_part` for body parts nested under an attachment, and Merge pull request #57521 from 55728/fix-assert-part-nested-multipart.

More from @rails

Daily updates, in your inbox

Follow Rails

Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?