lib/lucid/ast/scenario_outline.rb in lucid-0.0.9 vs lib/lucid/ast/scenario_outline.rb in lucid-0.1.0
- old
+ new
@@ -9,15 +9,14 @@
include Names
include HasLocation
attr_accessor :feature
attr_reader :feature_tags
- attr_reader :comment, :tags, :keyword
+ attr_reader :comment, :tags, :keyword, :background
module ExamplesArray #:nodoc:
def accept(visitor)
- return if Lucid.wants_to_quit
return if self.empty?
visitor.visit_examples_array(self) do
each do |examples|
examples.accept(visitor)
@@ -32,11 +31,11 @@
@language, @location, @background, @comment, @tags, @feature_tags, @keyword, @title, @description, @raw_steps, @example_sections = language, location, background, comment, tags, feature_tags, keyword, title, description, raw_steps, example_sections
attach_steps(@raw_steps)
end
def accept(visitor)
- return if Lucid.wants_to_quit
+ background.accept(visitor)
raise_missing_examples_error unless @example_sections
visitor.visit_feature_element(self) do
comment.accept(visitor)
tags.accept(visitor)
@@ -68,10 +67,10 @@
examples_array.each { |examples| examples.skip_invoke! }
end
def step_invocations(cells)
step_invocations = steps.step_invocations_from_cells(cells)
- @background.step_collection(step_invocations)
+ @background.create_step_invocations(step_invocations)
end
def each_example_row(&proc)
examples_array.each do |examples|
examples.each_example_row(&proc)