marick / Midje

Midje provides a migration path from clojure.test to a more flexible, readable, abstract, and gracious style of testing
MIT License
1.68k stars 128 forks source link

Why pr-str for failure description? #453

Closed WhittlesJr closed 5 years ago

WhittlesJr commented 5 years ago

I had some multi-line descriptions for my facts, and I noticed that when they failed the newlines came out as a bunch of very ugly \ns and it was all on one line. I tracked it down to here:

https://github.com/marick/Midje/blob/afeb21778cd679bca77f3aebbc4435b6b4f5e529/src/midje/emission/plugins/util.clj#L186

I tried removing the pr-str and it prints exactly as I would want.

Is there some benefit for using pr-str here that I'm not aware of?

philomates commented 5 years ago

Hey @WhittlesJr, sounds right and I don't see why it was there.

Can you see if https://github.com/marick/Midje/pull/454 looks right and I'll merge/deploy it?

WhittlesJr commented 5 years ago

Looks good to me! Thank you so much.

philomates commented 5 years ago

Deployed in midje 1.9.6