Skip to content

Unit Testing Drivers

Stephen von Takach edited this page Apr 4, 2017 · 8 revisions

Tests describe the behaviour of a driver and can be used to help with development. They are also useful in describing the intended usage of a driver.

See Extron DXP Tests for example usage

Checking values

We use rspec-expectations for verifying status variables and command results returned expected values.

Running Tests

There is a rake task where you can specify the file containing the driver spec. Drivers themselves are resolved and loaded internally, as they would be in a running system.

rake module:test['../aca-device-modules/modules/extron/switcher/dxp_spec.rb']