jnewland/cucumber-json — Issue #1: it does not work for tables
Author: jarl-dk
Created: 2011-10-19 11:14:16+00:00
State: open

The following patch illustrates the problem:
diff --git a/features/formatter.feature b/features/formatter.feature
index 084c14d..bd1198e 100644
--- a/features/formatter.feature
+++ b/features/formatter.feature
@@ -18,6 +18,9 @@ Feature: JSON formatter

Given /passing/ do
end
+
+ Given /a table/ do
+ end
"""
And a file named "features/one_failure.feature" with:
"""
@@ -112,4 +115,23 @@ Feature: JSON formatter
Scenario: All Features Passing
When I run cucumber -r ../../../lib -r features/step_definitions -f Cucumber::Formatter::JSON features/all_passing.feature
Then the output should contain "output['status_counts']['passed']" set to "2"
- And the output should contain no failing features
\ No newline at end of file
+ And the output should contain no failing features
+
+ Scenario: All Features Passing with table
+ Given a file named "features/table_passing.feature" with:
+ """
+ Feature: Table Passing
+
+ Scenario: Passing
+ Given a table
+ | name | col1 | col2 |
+ | rowa | vala1 | vala2 |
+ | rowb | valb1 | valb2 |
+
+ Scenario: Passing2
+ Given passing
+
+ """
+ When I run cucumber -r ../../../lib -r features/step_definitions -f Cucumber::Formatter::JSON features/table_passing.featur
+ Then the output should contain "output['status_counts']['passed']" set to "2"
+ And the output should contain no failing features