-
Notifications
You must be signed in to change notification settings - Fork 8
Shared specs
Phil Dinh edited this page Aug 21, 2018
·
1 revision
Engine adapters' shared specs help verify that all ActiveEncode::EngineAdapter implementations follow a set of expectations.
To use these shared examples, include them in your specific adapter's test file:
require 'shared_specs/engine_adapter_specs'
and then you can use the it_behaves_like
command to invoke the shared examples:
it_behaves_like "an ActiveEncode::EngineAdapter"
You must define these objects to be consumed by the shared specs: created_job
, running_job
, canceled_job
, completed_job
, failed_job
. The shared examples will raise an error if the variables they need aren't defined.
For reference of an adapter test using shared specs, see: spec/integration/elastic_transcoder_adapter_spec.rb