This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

test spy and mock

 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I read that we should not use mocks if a failed assertion cannot be reported effectively back to the Test Runner. This may be the case if the tested object is running inside a container that catches and eats all exceptions. In these cases we may be better off using a Test Spy.

Could anyone please explain about this? I mean can anybody show an example of an object that's running inside a container where mocks would fail and spy won't?
thanks
 
Tim Cooke
Sheriff
Pie
Posts: 2885
121
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's quite a broad question. What do you mean by "container"? And what kind of assertion are you talking about?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic