how to test a ruby script from another ruby script?

  • Thread starter Saravanan Sundaramoorthy
  • Start date
S

Saravanan Sundaramoorthy

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
 
R

Roger Pack

Saravanan said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top