luckyframework / luckyframework/carbon
be_delivered expectation fails when it shouldn't
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 87
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
I have a spec that looks like this:
```crystal
NewPostEmail.new(friend, me, post).should be_delivered
NewPostEmail.new(friend, me, later_post).should_not be_delivered
```
because I'm sending bulk emails. In this case, I want to make sure the first one is sent because `post` is valid for sending at this time, but `later_post` is not, and should not be sent out. When the spec runs, it says both should be delivered, but I think it's a false positive because it sees the same `to` and same `subject` lines and probably whatever else to determine that these are the same email even though they're not.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the shown Crystal spec and trace how the be_delivered expectation identifies an email, especially which message fields it compares. Reproduce the case with two emails sharing a recipient and subject but using different posts. Done means the expectation distinguishes the two messages and the first passes while the second fails as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100