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)


709
710
711
712
713
# File 'lib/cucumber/parser/feature.rb', line 709

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

#build(background, filter) ⇒ Object



729
730
731
732
733
734
735
736
737
738
739
# File 'lib/cucumber/parser/feature.rb', line 729

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_all_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


720
721
722
723
# File 'lib/cucumber/parser/feature.rb', line 720

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

#has_tags?(tag_names) ⇒ Boolean

Returns:

  • (Boolean)


715
716
717
718
# File 'lib/cucumber/parser/feature.rb', line 715

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)


725
726
727
# File 'lib/cucumber/parser/feature.rb', line 725

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