Sha256: 716454459b72b3bbee312acd7c6815b6e806f7cf2f39fac36482187f7622a7a2

Contents?: true

Size: 1.23 KB

Versions: 9

Compression:

Stored size: 1.23 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

9 entries across 9 versions & 1 rubygems

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