Class: Sapphire::DSL::Scenarios::Runner
- Defined in:
- lib/sapphire/DSL/Scenarios/runner.rb
Instance Attribute Summary collapse
-
#scenarios ⇒ Object
Returns the value of attribute scenarios.
-
#test_plans ⇒ Object
Returns the value of attribute test_plans.
Class Method Summary collapse
Instance Method Summary collapse
- #add_scenario(scenario) ⇒ Object
- #add_test_plan(test_plan) ⇒ Object
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #last_scenario ⇒ Object
- #last_test_plan ⇒ Object
Constructor Details
#initialize ⇒ Runner
Returns a new instance of Runner.
16 17 18 19 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 16 def initialize @scenarios = [] @test_plans = [] end |
Instance Attribute Details
#scenarios ⇒ Object
Returns the value of attribute scenarios.
5 6 7 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 5 def scenarios @scenarios end |
#test_plans ⇒ Object
Returns the value of attribute test_plans.
6 7 8 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 6 def test_plans @test_plans end |
Class Method Details
.create ⇒ Object
8 9 10 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 8 def self.create @@instance ||= Runner.new end |
.instance ⇒ Object
12 13 14 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 12 def self.instance @@instance ||= self.create end |
Instance Method Details
#add_scenario(scenario) ⇒ Object
21 22 23 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 21 def add_scenario(scenario) @scenarios << scenario end |
#add_test_plan(test_plan) ⇒ Object
29 30 31 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 29 def add_test_plan(test_plan) @test_plans << test_plan end |
#last_scenario ⇒ Object
25 26 27 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 25 def last_scenario @scenarios.last end |
#last_test_plan ⇒ Object
33 34 35 |
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 33 def last_test_plan @test_plans.last end |