Sha256: 726bc6c81a7b3757d7ee341365d7cff7e3e8843447e47e2948aea701471ab637

Contents?: true

Size: 1.59 KB

Versions: 11

Compression:

Stored size: 1.59 KB

Contents

Feature: Comment modeling

  Comment models represent a comment portion of a feature. They expose several attributes of the comment that they represent.


  Background:
    Given the following gherkin:
      """
      # a comment
      """
    And a comment model based on that gherkin
      """
        @model = CukeModeler::Comment.new(<source_text>)
      """


  Scenario: Modeling a comments text
    When the comment's text is requested
      """
        @model.text
      """
    Then the model returns "# a comment"

  Scenario: Modeling a comment's source line
    Given a feature file with the following gherkin:
      """
      # a comment
      Feature:
      """
    And a feature file model based on that file
      """
        @model = CukeModeler::FeatureFile.new(<file_path>)
      """
    And the comment model of that feature file model
      """
        @model = @model.comments.first
      """
    When the comment's source line is requested
      """
        @model.source_line
      """
    Then the model returns "1"

  Scenario: Modeling a comment's source column
    Given a feature file with the following gherkin:
      """
      # a comment
      Feature:
      """
    And a feature file model based on that file
      """
        @model = CukeModeler::FeatureFile.new(<file_path>)
      """
    And the comment model of that feature file model
      """
        @model = @model.comments.first
      """
    When the comment's source column is requested
      """
        @model.source_column
      """
    Then the model returns "1"

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cuke_modeler-3.23.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.22.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.21.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.20.1 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.20.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.19.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.18.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.17.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.16.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.15.0 testing/cucumber/features/modeling/comment_modeling.feature
cuke_modeler-3.14.0 testing/cucumber/features/modeling/comment_modeling.feature