freerange / mocha

A mocking and stubbing library for Ruby

Home Page:https://mocha.jamesmead.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve failure message

floehopper opened this issue · comments

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...