ruby - Can "assert" produce output for assertions that _pass_? -
assert(false, "statement true")
produces output (to stdout, default) containing descriptive message "statement true". if want output contain descriptive message assertions pass, i.e. if instead have assert(true, "statement true")
, there easy way send stdout along lines of "asserting 'statement true'... ok"?
you have manually print message, can define own assertion or helper method. try:
def assert_with_message(condition, message) assert status puts message end
and:
assert_with_message true, "assertion success message"
ruby minitest
No comments:
Post a Comment