add getStub() #216

Closed
masi opened this Issue Mar 25, 2011 · 3 comments

Comments

Projects
None yet
4 participants

masi commented Mar 25, 2011

Sometimes I need only a stub, but I have to use getMock(). This has two disadvantages. a) the reader may think that the tests uses the stub to verify something and (confusing) b) each stub will add up to the assert count (wrong).

addStub() will cure these issues.

Contributor

giorgiosironi commented Jul 5, 2011

You're right on the assertion count (not know what increases it), but the Test Double implementation is unique, so you can could build a mock with an object obtained via getStub() and a stub with an object obtained via getMock(). Maybe a getDouble() or getTestDouble() would be more clear?

Contributor

edorian commented Mar 27, 2012

Most of the work here would be doing all the needed doc updates and I don't really care and know enough to properly word this

Contributor

whatthejeff commented Mar 9, 2013

Closing this in favor of #550 which is a bit more detailed.

@whatthejeff whatthejeff closed this Mar 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment