Skip to content

Commit

Permalink
Test for the new outline expand feature for the JSON formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
brasmusson committed Jul 26, 2014
1 parent 18cb9a6 commit 02eb585
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions features/json_formatter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -487,4 +487,68 @@ Feature: JSON output formatter
}
]
"""
@spawn
Scenario: scenario outline expanded
When I run `cucumber --expand --format json features/outline.feature`
Then it should fail with JSON:
"""
[
{
"uri": "features/outline.feature",
"id": "an-outline-feature",
"keyword": "Feature",
"name": "An outline feature",
"line": 1,
"description": "",
"elements": [
{
"id": "an-outline-feature;outline;examples;2",
"keyword": "Scenario Outline",
"name": "outline",
"line": 8,
"description": "",
"type": "scenario",
"steps": [
{
"keyword": "Given ",
"name": "a passing step",
"line": 4,
"match": {
"location": "features/step_definitions/steps.rb:1"
},
"result": {
"status": "passed",
"duration": 1
}
}
]
},
{
"id": "an-outline-feature;outline;examples;3",
"keyword": "Scenario Outline",
"name": "outline",
"line": 9,
"description": "",
"type": "scenario",
"steps": [
{
"keyword": "Given ",
"name": "a failing step",
"line": 4,
"match": {
"location": "features/step_definitions/steps.rb:5"
},
"result": {
"status": "failed",
"error_message" : " (RuntimeError)\n./features/step_definitions/steps.rb:6:in `/a failing step/'\nfeatures/outline.feature:4:in `Given a <type> step'",
"duration": 1
}
}
]
}
]
}
]
"""

0 comments on commit 02eb585

Please sign in to comment.