method

capture_io

Importance_1
v1_9_3_125 - Show latest stable - 0 notes - Class: Assertions
capture_io() public

Captures $stdout and $stderr into strings:

out, err = capture_io do
  warn "You did a bad thing"
end

assert_match %r%bad%, err
Show source
Register or log in to add new notes.