Skip to content

Commit 493e60f

Browse files
Add feature describing expected serialization of docstrings
This is intended to help reproduce and diagnose cucumber/cucumber-ruby#1183.
1 parent 27e45d5 commit 493e60f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

features/docstring.feature

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Feature: Wire protocol docstrings
2+
3+
In order to use docstrings as arguments to step definitions, we send them as
4+
an additional argument after the arguments extracted by the wire server.
5+
6+
Background:
7+
Given a file named "features/step_definitions/some_remote_place.wire" with:
8+
"""
9+
host: localhost
10+
port: 54321
11+
12+
"""
13+
14+
Scenario: Run a scenario
15+
Given a file named "features/wired.feature" with:
16+
"""
17+
Feature: High strung
18+
Scenario: Wired
19+
Given we're all wired
20+
\"\"\"
21+
to want more
22+
\"\"\"
23+
"""
24+
And there is a wire server running on port 54321 which understands the following protocol:
25+
| request | response |
26+
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
27+
| ["begin_scenario"] | ["success"] |
28+
| ["invoke",{"id":"1","args":["to want more"]}] | ["success"] |
29+
| ["end_scenario"] | ["success"] |
30+
When I run `cucumber -f progress`
31+
Then the stderr should not contain anything
32+
And it should pass with:
33+
"""
34+
.
35+
36+
1 scenario (1 passed)
37+
1 step (1 passed)
38+
39+
"""

0 commit comments

Comments
 (0)