Open dfbernal opened 5 years ago
Hi @dfbernal,
you mean you'd like to see
You never said #'bar would be called with these arguments:
[({:n 1} {:n 2})]
instead of the following?
You never said #'bar would be called with these arguments:
["<an unrealized lazy sequence>"]
In theory we can do this, but it would mean evaluating the lazy-sequence. Since I didn't write the code that chose to print the "<an unrealized lazy sequence>"
message, I don't know what trade-offs were weighed when deciding to avoid evaluating the lazy seq. @marick can you recall the details of this decision?
Yes, exactly. That's the feature I'd like to see if possible. It would keep me from using mapv
when debugging tests 😃
When evaluating a prerequisite that expects a certain lazy sequence Midje correctly fails when the lazy sequence does not match the expectation but does not return what the lazy sequence was. The following code demonstrates this:
And the output is:
It would be very useful to see what the called parameters were instead of having the test output indicate that it was an unrealized lazy sequence. It would help when debugging since it allows you to see what the code was sending to the prerequisite.