Class: Scenarios::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/scenarios/base.rb

Overview

The base class is the one you’ll subclass in order to create a “scenario group”

Class Method Summary collapse

Class Method Details

.scenario(name, &block) ⇒ Scenairos::Scenario

Create a new instance of ‘Scenario` and register it.

Parameters:

  • name (String, Symbol)

    The scenario’s name

  • block (Proc)

    A block to be executed within the new scenario’s scope

Returns:

  • (Scenairos::Scenario)

    the new scenario



18
19
20
21
22
# File 'lib/scenarios/base.rb', line 18

def scenario(name, &block)
  obj = Scenario.new(name, &block)
  Scenarios.register(obj)
  obj
end