Class: Sapphire::DSL::Scenarios::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/sapphire/DSL/Scenarios/runner.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRunner

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

#scenariosObject

Returns the value of attribute scenarios.



5
6
7
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 5

def scenarios
  @scenarios
end

#test_plansObject

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

.createObject



8
9
10
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 8

def self.create
  @@instance ||= Runner.new
end

.instanceObject



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_scenarioObject



25
26
27
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 25

def last_scenario
  @scenarios.last
end

#last_test_planObject



33
34
35
# File 'lib/sapphire/DSL/Scenarios/runner.rb', line 33

def last_test_plan
  @test_plans.last
end