View Source Membrane.Testing.MockResourceGuard (Membrane Core v1.0.1)
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
.