5 ms·
This was a great read. I find this approach to be the path of least resistance with languages like C#, but for Python or Ruby, I always find myself using a mock
by dev360 12y ago
This was a great read. I find this approach to be the path of least resistance with languages like C#, but for Python or Ruby, I always find myself using a mock framework. That overhead in structure (classes, interfaces etc.) feels like it adds very little in dynamic languages and generally the mock syntax can be quite readable (notably RSpec mocks).
- platz 12y agoI must admit I work in C# and with the static experience, but I'd be nervous to use mocks when the implementation might not match the api of the mock anymore, because you don't get errors if the thing your mocking changes.