Sha256: d9c673bcc1ee4d67a1864b7b85bb90ff9d300d596adade6937c1003c2e4a5916
Contents?: true
Size: 1.31 KB
Versions: 2
Compression:
Stored size: 1.31 KB
Contents
Feature: Table diffing To allow you to more easily compare data in tables, you are able to easily diff a table with expected data and see the diff in your output. Scenario: Extra row Given 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/steps.rb" with: """ Then /the table should be:/ do |expected| x=1 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/steps.rb:1 | x | y | | a | b | | a | c | Tables were not identical (Cucumber::MultilineArgument::DataTable::Different) ./features/step_definitions/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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cucumber-2.0.0.beta.2 | features/docs/defining_steps/table_diffing.feature |
cucumber-2.0.0.beta.1 | features/docs/defining_steps/table_diffing.feature |