Midje icon indicating copy to clipboard operation
Midje copied to clipboard

facts don't catch exceptions that were outside of an => expression

Open pokle opened this issue 11 years ago • 4 comments

We've had a few test failures recently that have resulted in exception traces, but none of the usual Midje failure messages. That makes it a bit hard to know which fact the error was in.

For example:

(fact "you never see this message" (/ 1 0))

results in a stack trace in your terminal, but you never see the "you never see this message" message. That makes it a little bit harder to read.

This is important for us because we do a bit of preparation in a let form before the actual assertions. And if there are any errors in the let block, you never see which form the error was in...

(fact "blah" (let [something (get-something)] something => nil?))    

pokle avatar Nov 11 '14 00:11 pokle

Added to trello board https://trello.com/b/seyCqTK9/midje

marick avatar Nov 28 '14 20:11 marick

@pokle I am also a bit annoyed with that. Did you find a workaround?

vincentbernat avatar Nov 17 '15 10:11 vincentbernat

@vincentbernat Sorry I don't know of a workaround.

pokle avatar Nov 18 '15 04:11 pokle

If fixing this, don't forget to note the (now-closed) #336

marick avatar Dec 13 '15 22:12 marick