View Source Membrane.Testing.MockResourceGuard (Membrane Core v1.1.0)

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

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

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

Functions

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

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

start_link(options \\ [])

View Source
@spec start_link(options()) :: {:ok, pid()}