Sha256: 6f61e6fe1600709cc9a2416d45eee1ef5f06fe2a9f33f0b45edde163e20723a4

Contents?: true

Size: 1.22 KB

Versions: 20

Compression:

Stored size: 1.22 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"

Version data entries

20 entries across 20 versions & 1 rubygems

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