Skip to content

Commit 898e01c

Browse files
author
José Valim
committed
Merge pull request #1921 from jwarwick/capture_io_docs
Cleaning up ExUnit.CaptureIO docs
2 parents 4e2a123 + 2472509 commit 898e01c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/ex_unit/lib/ex_unit/capture_io.ex

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defmodule ExUnit.CaptureIO do
22
@moduledoc %S"""
3-
This module provides functionality to capture IO to test it.
3+
Functionality to capture IO for testing.
44
55
## Examples
66
@@ -19,16 +19,18 @@ defmodule ExUnit.CaptureIO do
1919
"""
2020

2121
@doc """
22-
Captures IO. Returns nil in case of no output,
22+
Captures IO generated when evaluating `fun`.
23+
24+
Returns `nil` in case of no output,
2325
otherwise returns the binary which is the captured output.
2426
25-
By default, capture_io replaces the group_leader (`:stdio`)
27+
By default, `capture_io` replaces the `group_leader` (`:stdio`)
2628
for the current process. However, the capturing of any other
27-
named device like `:stderr` is also possible globally by
28-
giving the registered device name explicitly as argument.
29+
named device, such as `:stderr`, is also possible globally by
30+
giving the registered device name explicitly as an argument.
2931
30-
When capturing `:stdio` and the `:capture_prompt` option is `false`,
31-
prompts (specified as arguments in IO.get* functions) are not
32+
When capturing `:stdio`, if the `:capture_prompt` option is `false`,
33+
prompts (specified as arguments to `IO.get*` functions) are not
3234
captured.
3335
3436
A developer can set a string as an input. The default

0 commit comments

Comments
 (0)