How to test a ruby script from another ruby script?

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs