Module: Inferno::DSL::Configurable
- Defined in:
- lib/inferno/dsl/configurable.rb
Overview
This module contains the DSL for managing runnable configuration. Runnable configuration provides a way to modify test behavior at boot time.
The main features enabled by configuration are:
- Modifying the properties of a runnable’s inputs. This could include locking a particular input, making a particular input optional/required, or changing an input’s value.
- Renaming an input/output/request to avoid name collisions when a test suite uses the same test multiple times.
- Tests can define custom configuration options to enable different
- testing behavior.
Defined Under Namespace
Classes: Configuration
Instance Method Summary collapse
-
#config(new_configuration = {}) ⇒ Inferno::DSL::Configurable::Configuration
Define/update/get the configuration for a runnable.
Instance Method Details
#config(new_configuration = {}) ⇒ Inferno::DSL::Configurable::Configuration
Define/update/get the configuration for a runnable. This configuration will be applied to the runnable and all of its children.
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/inferno/dsl/configurable.rb', line 86 def config(new_configuration = {}) @config ||= Configuration.new return @config if new_configuration.blank? @config.apply(new_configuration) all_children.each { |child| child.config(new_configuration) } @config end |