abstract class DriverSpecs::MockDriver
- DriverSpecs::MockDriver
- Reference
- Object
Defined in:
placeos-driver/driver-specs/mock_driver.crMacro Summary
-
status(klass, key)
reads a status key and deserialises the value into the class provided.
-
status?(klass, key)
reads a status key and deserialises the value into the class provided.
Instance Method Summary
-
#[](key)
returns the current value of a status value and raises if it does not exist
-
#[]=(key, value)
Expose a status key to other mock drivers and the driver we're testing
-
#[]?(key)
returns the current value of a status value and nil if it does not exist
-
#logger
proxies
Log
so you can use the logger in the same way as drivers -
#signal_status(key)
pushes a change notification for the key specified, even though it hasn't changed
-
#system(module_id : String | Symbol) : DriverSpecs::StatusHelper
Grab the status storage for a mock module
Macro Detail
reads a status key and deserialises the value into the class provided.
It raises if the class does not exist.
reads a status key and deserialises the value into the class provided.
It returns nil
if the key doesn't exist
Instance Method Detail
pushes a change notification for the key specified, even though it hasn't changed
Grab the status storage for a mock module
i.e. #system("Module_2")