lib/cucumber/ast/scenario_outline.rb in aslakhellesoy-cucumber-0.1.99.11 vs lib/cucumber/ast/scenario_outline.rb in aslakhellesoy-cucumber-0.1.99.12
- old
+ new
@@ -25,10 +25,11 @@
def at_lines?(lines)
super || @examples_array.detect { |examples| examples.at_lines?(lines) }
end
def accept(visitor)
+ visitor.visit_background(@background) if @background
visitor.visit_comment(@comment)
visitor.visit_tags(@tags)
visitor.visit_scenario_name(@keyword, @name, file_line(@line), source_indent(text_length))
@steps.each do |step|
visitor.visit_step(step)
@@ -38,11 +39,14 @@
end
end
def execute_row(cells, visitor, &proc)
exception = nil
- visitor.world(self) do |world|
- previous_status = :passed
+
+ prior_world = @background ? @background.world : nil
+ visitor.world(self, prior_world) do |world|
+
+ previous_status = @background ? @background.status : :passed
argument_hash = cells.to_hash
cell_index = 0
@steps.each do |step|
executed_step, previous_status, matched_args =
step.execute_with_arguments(argument_hash, world, previous_status, visitor, cells[0].line)