-
Notifications
You must be signed in to change notification settings - Fork 2
Unit Testing Drivers
Stephen von Takach edited this page Apr 3, 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
We use https://github.com/rspec/rspec-expectations for verifying status variables and command results returned expected values.
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_test.rb']