Ask HN: Being Concrete in Tests
I remember reading in a book that in tests, you generally want to be concrete, not abstract. For example, you'd like to do:
assert(response.status == 401)
assert(error == "param 'foo' is invalid")
instead of: assert(response.status == Http.StatusUnauthorized)
assert(error == HttpError.InvalidParameter("foo"))
Can anyone point me to resources (books, posts, tweets, whatever) that better illustrate this and justify it?
0 comments
[ 0.29 ms ] story [ 7.4 ms ] threadNo comments yet.