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)


707
708
709
710
711
# File 'lib/cucumber/parser/feature.rb', line 707

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

#build(background, filter) ⇒ Object



723
724
725
726
727
728
729
730
731
732
733
# File 'lib/cucumber/parser/feature.rb', line 723

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

#matches_name?(regexp_to_match) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#matches_tags?(tag_expression) ⇒ Boolean

Returns:

  • (Boolean)


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

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