From: Saravanan Sundaramoorthy on 17 Jul 2010 05:40 i have a ruby echo server script working, but to validate that its working fine, how to write a ruby script(test case) to provide fake stdin input to that echo server script and find if the same has been displayed back by the echo server script. Can any point some examples on the same? Thanks -- Posted via http://www.ruby-forum.com/.
From: Roger Pack on 19 Jul 2010 08:06 Saravanan Sundaramoorthy wrote: > i have a ruby echo server script working, but to validate that its > working fine, how to write a ruby script(test case) to provide fake > stdin input to that echo server script and find if the same has been > displayed back by the echo server script. > > Can any point some examples on the same? http://en.wikibooks.org/wiki/Ruby_Programming/Running_Multiple_Processes might be of some service to you. I've also seen core do it by redirecting STDOUT and capturing what is written to it, if you don't want to spawn new processes. GL. -r -- Posted via http://www.ruby-forum.com/.
|
Pages: 1 Prev: client-side Ruby on iPad/iPhone? Next: Infinite Loop in Code -- Logic Error |