From: "Eustáquio Rangel" Date: 2006-05-04T04:15:50+09:00 Subject: Re: Unit test setup Hi. > You're mixing up responses among different people here, and that is > very poor mailing list etiquette. Sorry if you didn't like that. I was just trying to be shorter on the same answer. >> 1 - Connect on the socket (the "global" setup). > You should be using a stub instead. > You shouldn't be connecting to anything during a unit test. > You shouldn't have to do all the setup for every test, just the setup > for the test. > You should be able to test sending a ping without fetching an id. > You should be able to test sending a ping without an id. You may > need to refactor your code. > To help you on your way I've got another trick for you. Thanks for the code/tips. :-) -- Posted via http://www.ruby-forum.com/.