Skip to content

Add failing specs for when `with` is combined with count constraints.

gitlab-qa-bot requested to merge expectation-count-with-args-bug into master

Created by: myronmarston

When the message is also received with other arguments, the other arguments are included in the failure message rather than the invalid counts, which is confusing.

Note that when the message is never received with the specified args (but is received with other args), it probably makes sense to keep the failure message how it is now (where it mentions the unexpected args), but when it is received with the specified args, I think it makes sense to mention the wrong count. We may need to add some additional specs for this.

I discovered this when working on some rspec-core stuff. I may come back to this later but for now I wanted to just open a PR with failing specs so we don't forget about it. Anyone else can feel free to take it :).

Merge request reports