[rspec-users] Test Design Question #2

Curtis j Schofield curtis.schofield at gmail.com
Wed Mar 30 12:34:38 EDT 2011

I am designing a test around a class that interacts with TCPSocket - I
have used a mock and have asserted as minimal an interface as I can -
centered around the IO methods.

Should i be using a stub instead and stub on open and read - instead
of mock with open, read , close and so forth.

Is there a good pattern for testing TCP servers in a unit-oriented way?

I could make a micro server in the test - but that seems to be not
what i really want.

Thank you

make haste slowly \
festina lente  \
mobile  +1_415_632_6001
curtis.schofield at gmail.com

More information about the rspec-users mailing list