Sha256: 0c10dada776040af571b3b54442f96c029a0b5361c7d45aa7d13427623ed7cbe

Contents?: true

Size: 1.38 KB

Versions: 22

Compression:

Stored size: 1.38 KB

Contents

Feature: Table diffing
  In order to more easily compare data in tables
  step definition writers should be able to diff
  a table with expected data and see the diff inline
  
  Scenario: Extra row
    Given a standard Cucumber project directory structure
    And a file named "features/tables.feature" with:
      """
      Feature: Tables
        Scenario: Extra row
          Then the table should be:
            | x | y |
            | a | b |
      """
    And a file named "features/step_definitions/table_steps.rb" with:
      """
      Then /the table should be:/ do |expected|
        expected.diff!(table(%{
          | x | y | 
          | a | c |
        }))
      end
      """
    When I run cucumber -i features/tables.feature
    Then it should fail with
      """
      Feature: Tables
      
        Scenario: Extra row         # features/tables.feature:2
          Then the table should be: # features/step_definitions/table_steps.rb:1
            | x | y |
            | a | b |
            | a | c |
            Tables were not identical (Cucumber::Ast::Table::Different)
            ./features/step_definitions/table_steps.rb:2:in `/the table should be:/'
            features/tables.feature:3:in `Then the table should be:'
      
      Failing Scenarios:
      cucumber features/tables.feature:2 # Scenario: Extra row

      1 scenario (1 failed)
      1 step (1 failed)

      """

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
davidtrogers-cucumber-0.6.2 features/table_diffing.feature
cucumber-0.6.2 features/table_diffing.feature
cucumber-0.6.1 features/table_diffing.feature
cucumber-0.6.0 features/table_diffing.feature
cucumber-0.5.3 features/table_diffing.feature
cucumber-0.5.2 features/table_diffing.feature
cucumber-0.5.1 features/table_diffing.feature
cucumber-0.5.0 features/table_diffing.feature
cucumber-0.4.5.rc2 features/table_diffing.feature
kbaum-cucumber-0.4.5.pre features/table_diffing.feature
cucumber-0.4.5.rc1 features/table_diffing.feature
middleman-0.10.17 vendor/gems/gems/cucumber-0.4.4/features/table_diffing.feature
middleman-0.10.16 vendor/gems/gems/cucumber-0.4.4/features/table_diffing.feature
middleman-0.10.15 vendor/gems/gems/cucumber-0.4.4/features/table_diffing.feature
rackjour-0.1.8 vendor/gems/gems/cucumber-0.4.4/features/table_diffing.feature
middleman-0.10.14 vendor/gems/gems/cucumber-0.4.4/features/table_diffing.feature
cucumber-0.4.4 features/table_diffing.feature
cucumber-0.4.3 features/table_diffing.feature
cucumber-0.4.2 features/table_diffing.feature
cucumber-0.4.1 features/table_diffing.feature