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)


818
819
820
821
822
# File 'lib/cucumber/parser/feature.rb', line 818

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

#build(background, filter) ⇒ Object



843
844
845
846
847
848
849
850
851
852
853
854
# File 'lib/cucumber/parser/feature.rb', line 843

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)


835
836
837
# File 'lib/cucumber/parser/feature.rb', line 835

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

#matches_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


829
830
831
832
833
# File 'lib/cucumber/parser/feature.rb', line 829

def matches_tags?(tag_names)
  feature_tag_names = self.parent.parent.tags.tag_names
  source_tag_names = (feature_tag_names + tags.tag_names).uniq
  Ast::Tags.matches?(source_tag_names, tag_names)
end

#outline_at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


824
825
826
827
# File 'lib/cucumber/parser/feature.rb', line 824

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

#outline_matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


839
840
841
# File 'lib/cucumber/parser/feature.rb', line 839

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