You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error is helpful if you genuinely misuse the Mt test, but in this case I thought I was giving it a string and a regex. It must be that tl1.description is nil. So a more helpful error message would be
Expect a String and a Regexp (any order); got [nil, Regexp]
Another thing to consider is this: should Mt acceptnil and a regex, and fail the test (because no match was found) rather than error the test (because the wrong argument types were given)? This could be argued either way and requires further thought.
The text was updated successfully, but these errors were encountered:
Given the code
I ran the test and got the error
The error is helpful if you genuinely misuse the Mt test, but in this case I thought I was giving it a string and a regex. It must be that
tl1.description
isnil
. So a more helpful error message would beAnother thing to consider is this: should Mt accept
nil
and a regex, and fail the test (because no match was found) rather than error the test (because the wrong argument types were given)? This could be argued either way and requires further thought.The text was updated successfully, but these errors were encountered: