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
#==, #each_direct_children, #each_sub_nodes, #kind, #pretty_print_instance_variables, #project, #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.
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/hiptest-publisher/nodes.rb', line 446 def initialize(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new) super() test_plan.parent = self if test_plan.respond_to?(:parent=) 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
462 463 464 465 466 467 468 469 |
# File 'lib/hiptest-publisher/nodes.rb', line 462 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 |