Ever wondered why there are so many different names for the objects that mimic behaviour of the 'real' objects in a system - mocks, stubs, fakes, doubles...
I can't help looking at the tables of definitions on this page and think why bother!
Why have all these mocking frameworks gone and raised the bar of understanding for people who don't like TDD or who don't currently do TDD. To me everything is a mock if it's not the real thing - pure and simple. So when I write tests I call everything a 'Mock' so the tests are easy to read & understand by the anyone (including people adverse to TDD). Prehaps this is one of the reasons why I've stopped using mocking frameworks in general.
I'm sure some people think the distinction between a stub and mock is important but it isn't, the test is important not what & how you mock.
Awkward Coder
I can't help looking at the tables of definitions on this page and think why bother!
Why have all these mocking frameworks gone and raised the bar of understanding for people who don't like TDD or who don't currently do TDD. To me everything is a mock if it's not the real thing - pure and simple. So when I write tests I call everything a 'Mock' so the tests are easy to read & understand by the anyone (including people adverse to TDD). Prehaps this is one of the reasons why I've stopped using mocking frameworks in general.
I'm sure some people think the distinction between a stub and mock is important but it isn't, the test is important not what & how you mock.
Awkward Coder
Comments
Post a Comment