DriverSpecs
Inherits Reference < Object
A place driver has 4 typical points of IO contact
- Place driver protocol (placeos-core's point of contact)
- The modules transport layer (module to device comms)
- An optional HTTP client
- Redis for state storage and subscriptions
Constants
Class methods
Instance methods
executes a function on the driver being tested and returns response promise
i.e. response = exec(:method_on_driver, arg1, arg2)
then to process the response response.get.should eq "method response"
executes a function on the driver being tested and returns response promise
i.e. response = exec(:method_on_driver, arg1, arg2)
then to process the response response.get.should eq "method response"
executes a function on the driver being tested and returns response promise
i.e. response = exec(:method_on_driver, arg1, arg2)
then to process the response response.get.should eq "method response"
executes a function on the driver being tested and returns response promise
i.e. response = exec(:method_on_driver, arg1, arg2)
then to process the response response.get.should eq "method response"
provides a method for accepting and responding to HTTP requests being made by the driver
for an example of how this works see an existing driver
A particular response might disconnect the socket Then we want to wait for the reconnect to occur before continuing the spec
obtain some data you were expecting to receive from the driver. Typically triggered by an exec you've made.
expect_send.should eq "some data"
transmits some data to the driver, typically a response to something the driver has sent
transmit "\nsome response"
allows you to provide alternative settings to the driver being tested.
by default the drivers default_settings are used
expects the data provided to be sent
should_send "some data"
Grab a Mock driver instance that has been defined by updating the system
For example a system may look like: {Display: {MockDisplay, MockDisplay}}
We can obtain mock display 2 by calling mock_display = system(:Display_2)
Then we can check status on it mock_display[:power]?.should eq true
provides a new system definition for testing Logic Modules
expects {ModuleName: {Klass, Klass}}
see an example of it in use
transmits some data to the driver, typically a response to something the driver has sent
transmit "\nsome response"