Seeing Java examples after this does not surprise me. Testing is hard in Java and it forces you to change your design. Maybe better put - testing stateful objects is hard
I do a lot of dev in Ruby and testing there is super easy and powerful. Say what you will about monkey patching, open classes, and reflection, but it does make it very easy to write great testing libraries. I'd argue that testing libraries in Ruby lead to better design (e.g. using more methods, making things single purpose, thinking about the interface first can lead to better naming etc)
That said, I don't test as much as I used to. Unit testing is really good for testing algorithms (e.g. transform this complex JSON; rebalance load). Outside of that, some light end-to-end testing will catch most other things, and you can use staging and gradual rollouts to derisk bigger changes
I do a lot of dev in Ruby and testing there is super easy and powerful. Say what you will about monkey patching, open classes, and reflection, but it does make it very easy to write great testing libraries. I'd argue that testing libraries in Ruby lead to better design (e.g. using more methods, making things single purpose, thinking about the interface first can lead to better naming etc)
That said, I don't test as much as I used to. Unit testing is really good for testing algorithms (e.g. transform this complex JSON; rebalance load). Outside of that, some light end-to-end testing will catch most other things, and you can use staging and gradual rollouts to derisk bigger changes