mikel / mikel/mail

Sent-mail matchers raise when expected fields are absent

Open
#1,682 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
3.7k
Forks
934
PR merge metrics
No merged PRs in 30d

Description

## Problem

Attachment and sent-mail matchers dereference optional message fields without checking for absence. Matching messages that omit those fields can raise instead of returning a normal mismatch.

Prepared commit `9b8e6494e3a89be1f1da6cdd1d5f8ddd94bc0b0d` makes the optional-field comparisons nil-safe without changing populated-field matching.

External matcher models cover absent/present fields, regex/string expectations and attachments. The unchanged 1,837-example suite passes on Ruby 4.0.6 and 3.2.11; package and Action Mailer integration pass.

CONTRIBUTING requires regression specs, so this report does not open a source-only PR or modify tests.

Contributor guide

Open the contributing guide

Research direction

Start with the sent-mail and attachment matcher implementations and the external matcher models covering absent and present fields. Run the relevant matcher examples first, then check package and Action Mailer integration. Done means absent optional fields produce a normal mismatch, populated-field matching remains unchanged, and regression specs satisfy CONTRIBUTING.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.