abstract class DriverSpecs::MockDriver

Defined in:

placeos-driver/driver-specs/mock_driver.cr

Macro Summary

Instance Method Summary

Macro Detail

macro status(klass, key) #

reads a status key and deserialises the value into the class provided.

It raises if the class does not exist.


[View source]
macro status?(klass, key) #

reads a status key and deserialises the value into the class provided.

It returns nil if the key doesn't exist


[View source]

Instance Method Detail

def [](key) #

returns the current value of a status value and raises if it does not exist


[View source]
def []=(key, value) #

Expose a status key to other mock drivers and the driver we're testing


[View source]
def []?(key) #

returns the current value of a status value and nil if it does not exist


[View source]
def logger #

proxies Log so you can use the logger in the same way as drivers


[View source]
def signal_status(key) #

pushes a change notification for the key specified, even though it hasn't changed


[View source]
def system(module_id : String | Symbol) : DriverSpecs::StatusHelper #

Grab the status storage for a mock module

i.e. #system("Module_2")


[View source]