Hi,

I'm commenting without having seen the presentation, but....

I think the point of the Fowler article is more to differentiate  
between verifying state (classic TDD) and verifying interactions  
(mockist TDD).   That is with classic TDD the tests tend to be  
concerned with how the code under test changes the system; with  
mockist TDD there is more concern with how it interacts with the rest  
of the system.  I much prefer classic TDD, but that's a whole essay.


On 19 Oct 2009, at 20:08, Matt Roberts wrote:

> I suppose its important to differenciate between mocks and stubs as  
> long as the testing/mocking/stubbing frameworks out there  
> differenciate, although I'm not sure what there is to be gained by  
> having 2 different terms, whats wrong with "there are mocks, oh and  
> by the way you can also test the expected behavoir with them" ?
>

It's probably still useful to call them different things as they tend  
to be used differently in mockist tests.  You might want to verify  
that a service is called with the correct parameters in one tests, but  
it muddies the waters to be verifying that in all the others; you'd  
use a mock for the first and stubs for the others.  I think Jay Fields  
explains it better than I can right now.  (Tired.)

http://blog.jayfields.com/2008/01/testing-one-expectation-per-test.html


----------------
Paul Wilson
http://edgecase.com
http://merecomplexities.com
http://scottishrubyconf.com/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NWRUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to