3 ms·
Not in the Ruby community. And I think dynamic languages in general. Your test suite should be comprehensive enough to cover something as significant as a delet
by tinco 13y ago
Not in the Ruby community. And I think dynamic languages in general. Your test suite should be comprehensive enough to cover something as significant as a deleted function.
If you maintain the attitude that your test suite is a last safety net, then you will never be able to confidently refactor, which is what TDD in my opinion is all about.
- joosters 13y agoYes yes yes, your test suite 'should' be comprehensive enough. But is it? Are you sure? Instead of using the tests for confirmation, you should be reasoning about the code that you are editing to be happy that your changes make sense. Having the test suites as well is just icing on the cake.
- wlievens 13y agoVerifying whether your test suite is comprehensive enough is not that hard in theory, if you apply mutation testing.
- tinco 13y agoIt's not that hard in practice either. Besides mutation testing (which becomes a rather slow affair when your codebase is of significant size) you can just do coverage checks. If you have a simple branch coverage, that alone can guarantee (in most situations) which methods are used and which aren't in your tests.
- wlievens 13y agoActually coveragr only shows you that the code executes, it doesn't tell you if it's testef.