# `Cheer.Test`
[🔗](https://github.com/joshrotenberg/cheer/blob/v0.1.5/lib/cheer/test.ex#L1)

In-process test runner for CLI commands.

Invokes a command capturing stdout and return value, without spawning a subprocess.

## Usage

    result = Cheer.Test.run(MyCommand, ["--port", "8080"])
    assert result.return == {:ok, %{port: 8080}}
    assert result.output == ""

# `t`

```elixir
@type t() :: %Cheer.Test{output: String.t(), return: term()}
```

# `run`

```elixir
@spec run(module(), [String.t()], keyword()) :: t()
```

Run a command with the given argv, capturing output and return value.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
