Sha256: d09941219af451da89c1562b20fe3eb574f1d5d3adac5f08f32957284ea92728

Contents?: true

Size: 1.81 KB

Versions: 11

Compression:

Stored size: 1.81 KB

Contents

Feature: Table modeling

  Table models represent represent the table argument to a step. They expose several attributes of the table that they represent.


  Background:
    Given the following gherkin:
      """
      | value 1 | value 2 |
      | value 3 | value 4 |
      """
    And a table model based on that gherkin
      """
        @model = CukeModeler::Table.new(<source_text>)
      """


  Scenario: Modeling a table's rows
    When the table's rows are requested
      """
        @model.rows
      """
    Then the model returns models for the following rows:
      | value 1 | value 2 |
      | value 3 | value 4 |

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

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

  Scenario: Modeling a table's source column
    Given the following gherkin:
      """
      Feature:

        Scenario:
          * a step
            | value 1 |
            | value 2 |
      """
    And a feature model based on that gherkin
      """
        @model = CukeModeler::Feature.new(<source_text>)
      """
    And the table model inside of that feature model
      """
        @model = @model.tests.first.steps.first.block
      """
    When the table's source column is requested
      """
        @model.source_column
      """
    Then the model returns "7"

Version data entries

11 entries across 11 versions & 1 rubygems

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