spec/spec_helper.rb
# swap stdout/err by replacements
# => out/err replacement StringIO
swap stdout/err by replacements
> out/err replacement StringIO
swap stdout / err by replacements > out / err replacement StringIO
def streams_before
  out_ = $stdout
  err_ = $stderr
  $stdout = StringIO.new
  $stderr = StringIO.new
  return out_,err_
end
def streams_before out_ = $stdout err_ = $stderr $stdout = StringIO . new $stderr = StringIO . new return out_ , err_ end
swap stdout/err by replacements
> out/err replacement StringIO
swap stdout / err by replacements > out / err replacement StringIO