# `BB.Inference.Test.FakeRuntime`
[🔗](https://github.com/beam-bots/bb_inference/blob/main/test/support/fake_runtime.ex#L5)

A runtime that loads nothing and doubles every input it runs.

With the `:gate` option, each `load/2` waits for the test to decide how it
ends: it sends `{:fake_runtime, :load, gate, loader_pid}` to the pid stored
at `{BB.Inference.Test.FakeRuntime, gate}` in `:persistent_term`, and waits
for `{:fake_runtime, :load_result, result}`. With no pid stored, it loads.

`:outputs` replaces the output the description reports, for testing codecs
that don't fit. Each `unload/1` is reported as
`{:fake_runtime, :unload, gate}`.

# `answer`

```elixir
@spec answer(pid(), :ok | {:error, term()}) :: :ok
```

Answer a waiting load.

# `hold`

```elixir
@spec hold(atom()) :: :ok
```

Make every load through `gate` wait for the calling process to answer.

# `release`

```elixir
@spec release(atom()) :: :ok
```

Let loads through `gate` proceed without asking.

---

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