brook v0.6.0 Brook.Driver.Test
A driver for use in unit tests that will send any events sent by your application to your test process as messages in the format {:brook_event, %Brook.Event{} = event}
Example:
instance_name = :my_instance
Brook.Test.register(instance_name)
...
Brook.Test.send(instance_name, ...)
...
assert_receive {:brook_event, %Brook.Event{...}}
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.init/1
.
Callback implementation for Brook.Driver.send_event/3
.
Callback implementation for Brook.Driver.start_link/1
.
Link to this section Functions
Link to this function
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
init(args)
Callback implementation for GenServer.init/1
.
Link to this function
send_event(instance, type, event)
Callback implementation for Brook.Driver.send_event/3
.
Link to this function
start_link(opts)
Callback implementation for Brook.Driver.start_link/1
.
Link to this function