Returns output for standard output and standard error as string.
Example:
capture_output do puts("stdout") warn("stderr") end # -> ["stdout\n", "stderr\n"]
[Validate]