Sha256: 8a0a6aef69c128f8bfa76f61c7a61fd7e6a39c6de2ccc17af72e24c4d818498a

Contents?: true

Size: 1.42 KB

Versions: 9

Compression:

Stored size: 1.42 KB

Contents

Feature: Doc string modeling


  Doc string models represent the doc string argument to a step. They expose several attributes of the doc string
  that they represent.


  Background:
    Given the following gherkin:
      """
      \"\"\" type foo
      content bar
      \"\"\"
      """
    And a doc string model based on that gherkin
      """
        @model = CukeModeler::DocString.new(<source_text>)
      """


  Scenario: Modeling a doc string's content type
    When the doc string's name is requested
      """
        @model.content_type
      """
    Then the model returns "type foo"

  Scenario: Modeling a doc string's content
    When the doc string's content is requested
      """
        @model.content
      """
    Then the model returns
      """
      content bar
      """

  Scenario: Modeling a doc string's source line
    Given the following gherkin:
      """
      Feature:

        Scenario:
          * a step
            \"\"\"
            foo
            \"\"\"
      """
    And a feature model based on that gherkin
      """
        @model = CukeModeler::Feature.new(<source_text>)
      """
    And the doc string model inside of that feature model
      """
        @model = @model.tests.first.steps.first.block
      """
    When the doc string's source line is requested
      """
        @model.source_line
      """
    Then the model returns "5"

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cuke_modeler-1.2.1 testing/cucumber/features/modeling/doc_string_modeling.feature
cuke_modeler-1.2.0 testing/cucumber/features/modeling/doc_string_modeling.feature
cuke_modeler-1.1.1 testing/cucumber/features/modeling/doc_string_modeling.feature
cuke_modeler-1.1.0 testing/cucumber/features/modeling/doc_string_modeling.feature
cuke_modeler-1.0.4 testing/cucumber/features/modeling/doc_string_modeling.feature
cuke_modeler-1.0.3 testing/cucumber/features/modeling/doc_string_modeling.feature
cuke_modeler-1.0.2 testing/cucumber/features/modeling/doc_string_modeling.feature
cuke_modeler-1.0.1 features/modeling/doc_string_modeling.feature
cuke_modeler-1.0.0 features/modeling/doc_string_modeling.feature