From 138c5fefed221f36c498c9b46496c468004d4f4c Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Thu, 24 Aug 2017 13:27:51 +0200 Subject: [PATCH] Add feature describing expected serialization of docstrings This is intended to help reproduce and diagnose cucumber/cucumber-ruby#1183. --- features/docstring.feature | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 features/docstring.feature diff --git a/features/docstring.feature b/features/docstring.feature new file mode 100644 index 0000000..b43f826 --- /dev/null +++ b/features/docstring.feature @@ -0,0 +1,39 @@ +Feature: Wire protocol docstrings + + In order to use docstrings as arguments to step definitions, we send them as + an additional argument after the arguments extracted by the wire server. + + Background: + Given a file named "features/step_definitions/some_remote_place.wire" with: + """ + host: localhost + port: 54321 + + """ + + Scenario: Run a scenario + Given a file named "features/wired.feature" with: + """ + Feature: High strung + Scenario: Wired + Given we're all wired + \"\"\" + to want more + \"\"\" + """ + And there is a wire server running on port 54321 which understands the following protocol: + | request | response | + | ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] | + | ["begin_scenario"] | ["success"] | + | ["invoke",{"id":"1","args":["to want more"]}] | ["success"] | + | ["end_scenario"] | ["success"] | + When I run `cucumber -f progress` + Then the stderr should not contain anything + And it should pass with: + """ + . + + 1 scenario (1 passed) + 1 step (1 passed) + + """