Module: Lopata
- Defined in:
- lib/lopata.rb,
lib/lopata/id.rb,
lib/lopata/role.rb,
lib/lopata/step.rb,
lib/lopata/runner.rb,
lib/lopata/version.rb,
lib/lopata/condition.rb,
lib/lopata/environment.rb,
lib/lopata/factory_bot.rb,
lib/lopata/shared_step.rb,
lib/lopata/active_record.rb,
lib/lopata/configuration.rb,
lib/lopata/generators/app.rb,
lib/lopata/observers/web_logger.rb,
lib/lopata/observers/base_observer.rb,
lib/lopata/observers/backtrace_formatter.rb,
lib/lopata/observers/console_output_observer.rb
Overview
Namespace for all Lopata code.
Defined Under Namespace
Modules: ActiveRecord, FactoryBot, Role Classes: Configuration, Environment, Scenario, ScenarioBuilder, World
Class Method Summary collapse
-
.configuration ⇒ Lopata::Configuration
Returns global configuration object.
-
.configure {|Lopata::Configuration| ... } ⇒ Object
Yields the global configuration to a block.
-
.define(*args, &block) ⇒ Object
Define the scenario.
-
.environment ⇒ Lopata::Environment
Return global environment object.
-
.shared_context(name, &block) ⇒ Object
Register the shared step for context.
-
.shared_setup(name, &block) ⇒ Object
Register the shared step for setup.
-
.shared_step(name, &block) ⇒ Object
Register the shared step.
-
.xdefine(*args, &block) ⇒ Object
Skip scenario definition.
Class Method Details
.configuration ⇒ Lopata::Configuration
Returns global configuration object.
107 108 109 |
# File 'lib/lopata.rb', line 107 def self.configuration @configuration ||= Lopata::Configuration.new end |
.configure {|Lopata::Configuration| ... } ⇒ Object
Yields the global configuration to a block.
100 101 102 |
# File 'lib/lopata.rb', line 100 def self.configure(&block) yield Lopata.configuration end |
.define(*args, &block) ⇒ Object
Define the scenario.
13 14 15 |
# File 'lib/lopata.rb', line 13 def self.define(*args, &block) Lopata::ScenarioBuilder.define(*args, &block) end |
.environment ⇒ Lopata::Environment
Return global environment object
120 121 122 |
# File 'lib/lopata.rb', line 120 def self.environment Lopata.configuration.environment end |
.shared_context(name, &block) ⇒ Object
Register the shared step for context.
shared_context is a shortcat for shared_step(‘name’) { context(‘name’) { .. } }. The block will be arrounded into the context call.
Shared context may be used in scenarios by name:
86 87 88 89 90 |
# File 'lib/lopata.rb', line 86 def self.shared_context(name, &block) Lopata::SharedStep.register(name) do context(name, &block) end end |
.shared_setup(name, &block) ⇒ Object
Register the shared step for setup.
shared_setup is a shortcat for shared_step ‘name’ { setup { .. } }. The block will be arrounded into the setup call.
Shared step may be used in scenarios by name:
63 64 65 66 67 |
# File 'lib/lopata.rb', line 63 def self.shared_setup(name, &block) Lopata::SharedStep.register(name) do setup(&block) end end |
.shared_step(name, &block) ⇒ Object
Register the shared step
Shared step may be used in scenarios by name:
39 40 41 |
# File 'lib/lopata.rb', line 39 def self.shared_step(name, &block) Lopata::SharedStep.register(name, &block) end |
.xdefine(*args, &block) ⇒ Object
Skip scenario definition. Option to temporary ignore scenario
18 19 |
# File 'lib/lopata.rb', line 18 def self.xdefine(*args, &block) end |