Boost Fertility New Invention Ups Success Rates.pdf
Piloting processes through std IO at the Ruby Drink-up of Sophia, January 2012
1. Piloting processes through standard I/O in Ruby Jan 25 th 2012 Muriel Salvan Open Source Lead developer and architect X-Aeon Solutions http://x-aeon.com
20. This is Line 4, after sleep 1 Output : Output on STDOUT only Output : Output on STDERR only Output : Output for interactive tests only Input : Input taken from STDIN sleep 1 sleep 1 sleep 1 Input from stdin Input from stdin
52. Aruba When I run `ruby test.rb` interactively And I type "My String 1" And I type "My String 2" Then the stdout should contain : """ This is Line 1, before sleep 1 This is Line 2, after sleep 1 Enter string 1: String 1 entered: My String 1 This is Line 3, before sleep 1 This is Line 4, after sleep 1 """ And the stderr should contain : " "" This is Line 1 on STDERR, before sleep 1 This is Line 2 on STDERR, after sleep 1 Enter string 2 from STDERR: String 2 entered: My String 2 """