Module: GollyUtils::Testing::DeferrableSpecs
- Defined in:
- lib/golly-utils/testing/rspec/deferrable_specs.rb
Overview
With this module you can create specs that don't start running until manually started elsewhere in another spec.
This is only really useful when writing integration tests in spec format, where specs (aka examples) are not isolated tests but single components of a larger-scale test. This is especially the case when checking asynchronous events, or managing dependencies on state of an external entity.
Usage
- Extend (not include) DeferrableSpecs.
- Create specs/examples using deferrable_spec.
- In other specs/examples, call start_deferred_tests to start deferred tests.
Defined Under Namespace
Modules: ClassMethods, InstanceMethods