marick/Midje — Issue #75: Consolidate prerequisite failure messages; add more information
Author: marick
Created: 2011-12-20 23:02:07+00:00
State: open
Labels: wishlist

Consider:

```clojure

(fact
(+ (f 1) (f 1)) => 801
(provided
(f 2) => 0
(f 3) => 800))
```

This will fail with these prerequisite-related messages:

```

FAIL at (core.clj:11)
You claimed the following was needed, but it was never used:
(f 2)

FAIL at (core.clj:12)
You claimed the following was needed, but it was never used:
(f 3)
```

There are two problems with this:

1. It's too wordy.
2. It doesn't show what *was* used, which is often helpful in debugging.

This would be better:

```
FAIL at (core.clj:11)
These calls were not made the right number of times:
(f 2) [expected at least once, actually never called]
(f 3) [expected at least once, actually never called]
These calls were not mentioned but still made:
(f 1)
```

Note: there's a little prettification of the most default implicit :times qualification. For the rest, I'd just print out `:times `, since that's what the user typed in.