Module: Cucumber::Parser::Feature::Scenario1

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

Instance Method Summary collapse

Instance Method Details

#at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


680
681
682
683
684
# File 'lib/cucumber/parser/feature.rb', line 680

def at_line?(line)
  scenario_keyword.line == line ||
  steps.at_line?(line) ||
  tags.at_line?(line)
end

#build(background, filter) ⇒ Object



695
696
697
698
699
700
701
702
703
704
705
# File 'lib/cucumber/parser/feature.rb', line 695

def build(background, filter)
  Ast::Scenario.new(
    background,
    comment.build, 
    tags.build,
    scenario_keyword.line,
    scenario_keyword.text_value, 
    name.build, 
    steps.build
  )
end

#has_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


686
687
688
689
# File 'lib/cucumber/parser/feature.rb', line 686

def has_tags?(tag_names)
  feature_tags = self.parent.parent.tags
  tags.has_tags?(tag_names) || feature_tags.has_tags?(tag_names)
end

#matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


691
692
693
# File 'lib/cucumber/parser/feature.rb', line 691

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