# `Membrane.Testing.MockResourceGuard`
[🔗](https://github.com/membraneframework/membrane-core/blob/v1.3.0/lib/membrane/testing/mock_resource_guard.ex#L1)

Mock for `Membrane.ResourceGuard`.

Informs the test process about registered cleanup functions and tags.
Works with `Membrane.Testing.Assertions`, for example
`Membrane.Testing.Assertions.assert_resource_guard_register/4`:

    iex> guard = Membrane.Testing.MockResourceGuard.start_link_supervised!()
    ...> Membrane.ResourceGuard.register(guard, fn -> :abc end, tag: :some_tag)
    ...> import Membrane.Testing.Assertions
    ...> assert_resource_guard_register(guard, function, :some_tag)
    ...> function.()
    :abc

# `options`

```elixir
@type options() :: [{:test_process, pid()}]
```

# `child_spec`

```elixir
@spec child_spec([{:test_process, pid()}]) :: Supervisor.child_spec()
```

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(options()) :: {:ok, pid()}
```

# `start_link_supervised!`

```elixir
@spec start_link_supervised!(options()) :: pid()
```

---

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