Class: Hiptest::Nodes::Project
- Defined in:
- lib/hiptest-publisher/nodes.rb
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #assign_scenarios_to_folders ⇒ Object
-
#initialize(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new) ⇒ Project
constructor
A new instance of Project.
Methods inherited from Node
#direct_children, #find_sub_nodes, #render
Constructor Details
#initialize(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new) ⇒ Project
Returns a new instance of Project.
355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/hiptest-publisher/nodes.rb', line 355 def initialize(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new) super() scenarios.parent = self tests.parent = self @children = { :name => name, :description => description, :test_plan => test_plan, :scenarios => scenarios, :actionwords => actionwords, :tests => tests } end |
Instance Method Details
#assign_scenarios_to_folders ⇒ Object
370 371 372 373 374 375 376 377 |
# File 'lib/hiptest-publisher/nodes.rb', line 370 def assign_scenarios_to_folders @children[:scenarios].children[:scenarios].each do |scenario| folder = @children[:test_plan].find_folder_by_uid(scenario.folder_uid) next if folder.nil? folder.children[:scenarios] << scenario end end |