3 ms·
Do you really need those tests? We are testing validations, CRUD operations, states, border conditions. Sometimes an integration test is enough to validate at l
by pmontra 5y ago
Do you really need those tests? We are testing validations, CRUD operations, states, border conditions. Sometimes an integration test is enough to validate at least the happy path and catch any mismatch between passed and expected arguments: if we are passing a string instead of an array of strings somewhere, the test will fail.
- smt88 5y agoIf the tests are catching bugs, obviously they need them. And if those bugs would be prohibited by static typing, then it sounds like Ruby is creating work. > if we are passing a string instead of an array of strings somewhere, the test will fail Is this an example of a real bug? It's mind boggling that anyone would use a language that allows them to type that bug into existence without an immediate error. I know we used to be forced to use JS, but not we even have TS so that we don't have to catch extremely machine-catchable errors in tests or, worse, production.
- closeparen 5y agoYou're going to write the tests anyway. Static typing doesn't free you from that responsibility. The question is whether any type errors would make it past a unit test suite focused on other kinds of correctness. In practice they usually don't.