Sha256: 5901a13631da1dd396752df3578b4cca765f06de693f9fc876bea58ef97d920b

Contents?: true

Size: 1.95 KB

Versions: 20

Compression:

Stored size: 1.95 KB

Contents

Feature: Step modeling

  Step models represent represent the a step in a scenario, outline, or background. They expose several attributes of the step that they represent.


  Background:
    Given the following gherkin:
      """
      * a step
      """
    And a step model based on that gherkin
      """
        @model = CukeModeler::Step.new(<source_text>)
      """


  Scenario: Modeling a step's keyword
    When the step's keyword is requested
      """
        @model.keyword
      """
    Then the model returns "*"

  Scenario: Modeling a step's base text
    When the step's base text is requested
      """
        @model.text
      """
    Then the model returns "a step"

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

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

  Scenario: Modeling a step's table
    Given a step model based on the following gherkin:
      """
      * a step
        | value 1 |
        | value 2 |
      """
    When the step's table is requested
      """
        @model.block
      """
    Then the model returns a model for the following table:
      | value 1 |
      | value 2 |

  Scenario: Modeling a step's doc string
    Given a step model based on the following gherkin:
      """
      * a step
        \"\"\"
        some text
        \"\"\"
      """
    When the step's doc string is requested
      """
        @model.block
      """
    Then the model returns a model for the following doc string:
      """
      some text
      """

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
cuke_modeler-3.13.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.12.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.11.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.10.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.9.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.8.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.7.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.6.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.5.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.4.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.3.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.2.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.1.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-3.0.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-2.1.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-2.0.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-1.5.1 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-1.5.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-1.4.0 testing/cucumber/features/modeling/step_modeling.feature
cuke_modeler-1.3.0 testing/cucumber/features/modeling/step_modeling.feature