3 ms·
I think people assume you need 100% coverage at every level of the testing pyramid and so you have redundant tests. Also, with Ruby in particular, the interface
by programminggeek 13y ago
I think people assume you need 100% coverage at every level of the testing pyramid and so you have redundant tests. Also, with Ruby in particular, the interfaces between objects and methods are so weak that you have no guarantee that things will fit together and behave properly.
For example, in Ruby you can have a method with 2 parameters of X and Y. Maybe X should be a string and maybe Y should be a float. You can unit test the method to make sure it does the right things, but as soon as something else calls that method there is no guarantee they will call it correctly or pass in the right type of arguments. Thus, there are tons of potential integration problems all over ruby code.
I think this lack of strong interfaces has trained ruby developers not to trust unit tests and so they go down the path of integration and end to end testing. Due to the weaker type and interface guarantees of the language, you will write more tests to get the same level of confidence in your code. By compensating for this language weakness, you are falling into "The Cucumber Test Trap" or more generically you aren't following the testing pyramid sensibly.