Sha256: cf67af49bd42a2c4c0fb81320ee1804bf9d457a01bf718f23fa0a1ea9f326a9f
Contents?: true
Size: 1.36 KB
Versions: 51
Compression:
Stored size: 1.36 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 (RuntimeError) ./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
51 entries across 51 versions & 7 rubygems