Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f4b7578

Browse files
committedApr 28, 2016
Add cURL output to Cucumber scenario. [zipmark#275]
1 parent 5a71d28 commit f4b7578

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎features/slate_documentation.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Feature: Generate Slate documentation from test examples
5050
config.app = App
5151
config.api_name = "Example API"
5252
config.format = :slate
53+
config.curl_host = 'http://localhost:3000'
5354
config.request_headers_to_include = %w[Content-Type Host]
5455
config.response_headers_to_include = %w[Content-Type Content-Length]
5556
end
@@ -219,6 +220,10 @@ Feature: Generate Slate documentation from test examples
219220
| page | Current page |
220221
221222
223+
224+
### cURL
225+
226+
<code>curl&nbsp;"http://localhost:3000/orders"&nbsp;-X&nbsp;GET&nbsp;&#92;<br>&nbsp;&nbsp;-H&nbsp;"Host:&nbsp;example.org"&nbsp;&#92;<br>&nbsp;&nbsp;-H&nbsp;"Cookie:&nbsp;"</code>
222227
"""
223228

224229
Scenario: Example 'Creating an order' file should look like we expect
@@ -266,6 +271,10 @@ Feature: Generate Slate documentation from test examples
266271
267272
268273
274+
275+
### cURL
276+
277+
<code>curl&nbsp;"http://localhost:3000/orders"&nbsp;-d&nbsp;'name=Order+3&amount=33.0'&nbsp;-X&nbsp;POST&nbsp;&#92;<br>&nbsp;&nbsp;-H&nbsp;"Host:&nbsp;example.org"&nbsp;&#92;<br>&nbsp;&nbsp;-H&nbsp;"Content-Type:&nbsp;application/x-www-form-urlencoded"&nbsp;&#92;<br>&nbsp;&nbsp;-H&nbsp;"Cookie:&nbsp;"</code>
269278
"""
270279

271280
Scenario: Example 'Deleting an order' file should be created

0 commit comments

Comments
 (0)
Please sign in to comment.