Closed gaborcsardi closed 9 years ago
Obviously, I can do this for myself with fail_with
, but I think it is something worth considering for the main package as wel.
Fair enough, except it's not strictly true.
You mean the form I used? Yes, indeed, it reads silly, actually, sorry about that.
The idea is not to waste a line, especially for a single failed condition, and to avoid the relatively lengthy text that essentially means "ERROR". But I cannot really say Assertions failed:
with one short word. Plus it is probably a good idea to start with Error:
. How about
Error: assertions failed:
✖ all(. < 50)
✖ all(.%%2 == 0)
for multiple failed assertions, and
Error: assertion failed: ✖ all(. < 50)
for single ones?
I am actually considering writing the checks in a way that they always fail with a single condition, for simplicity.
I will consider this a part of https://github.com/smbache/ensurer/issues/8, and close.
EDIT sorry, pressed enter by mistake.
I think being brief and succinct is a virtue. So how about
instead of