freerange / mocha

A mocking and stubbing library for Ruby
https://mocha.jamesmead.org
Other
1.22k stars 158 forks source link

Improve failure message #632

Open floehopper opened 10 months ago

floehopper commented 10 months ago

While working on #60, it struck me that the failure message could include details of each invocation and which expectation it matched. While I think this would make it easier to address #60, I think it might have a lot of other advantages. We could display each invocation including the actual arguments together with either the matched expectation or (for unexpected invocations) a list of expectations that might have matched if it weren't for certain constraints.

Looks like there might be some overlap with #177, #178 & #179 which all came out of #167 and might be a good way to split this up...