Module: Cucumber::Parser::Feature::ScenarioOutline1

Defined in:
lib/cucumber/parser/feature.rb

Instance Method Summary collapse

Instance Method Details

#at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


844
845
846
847
848
# File 'lib/cucumber/parser/feature.rb', line 844

def at_line?(line)
  outline_at_line?(line) ||
  examples_sections.at_line?(line) ||
  tags.at_line?(line)
end

#build(background, filter) ⇒ Object



869
870
871
872
873
874
875
876
877
878
879
880
# File 'lib/cucumber/parser/feature.rb', line 869

def build(background, filter)
  Ast::ScenarioOutline.new(
    background,
    comment.build, 
    tags.build,
    scenario_outline_keyword.line, 
    scenario_outline_keyword.text_value, 
    name.build, 
    steps.build, 
    examples_sections.build(filter, self)
  )
end

#matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


861
862
863
# File 'lib/cucumber/parser/feature.rb', line 861

def matches_name?(regexp_to_match)
  outline_matches_name?(regexp_to_match) || examples_sections.matches_name?(regexp_to_match)
end

#matches_tags?(tag_expression) ⇒ Boolean

Returns:

  • (Boolean)


855
856
857
858
859
# File 'lib/cucumber/parser/feature.rb', line 855

def matches_tags?(tag_expression)
  feature_tag_names = self.parent.parent.tags.tag_names
  source_tag_names = (feature_tag_names + tags.tag_names).uniq
  tag_expression.eval(source_tag_names)
end

#outline_at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


850
851
852
853
# File 'lib/cucumber/parser/feature.rb', line 850

def outline_at_line?(line)
  scenario_outline_keyword.line == line ||
  steps.at_line?(line)
end

#outline_matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


865
866
867
# File 'lib/cucumber/parser/feature.rb', line 865

def outline_matches_name?(regexp_to_match)
  name.build =~ regexp_to_match
end