@@ -143,26 +143,8 @@ Feature: Generate Slate documentation from test examples
143
143
And the output should contain "6 examples, 0 failures"
144
144
And the exit status should be 0
145
145
146
- Scenario : Index file should look like we expect
147
- Then the file "doc/api/index.markdown" should contain exactly:
148
- """
149
- # Example API
150
-
151
- ## Help
152
-
153
- * [Getting welcome message](help/getting_welcome_message.markdown)
154
-
155
- ## Orders
156
-
157
- * [Creating an order](orders/creating_an_order.markdown)
158
- * [Deleting an order](orders/deleting_an_order.markdown)
159
- * [Getting a list of orders](orders/getting_a_list_of_orders.markdown)
160
- * [Getting a specific order](orders/getting_a_specific_order.markdown)
161
- * [Updating an order](orders/updating_an_order.markdown)
162
- """
163
-
164
- Scenario : Example 'Getting a list of orders' file should look like we expect
165
- Then the file "doc/api/orders/getting_a_list_of_orders.markdown" should contain exactly:
146
+ Scenario : Example 'Getting a list of orders' docs should look like we expect
147
+ Then the file "doc/api/_generated_examples.markdown" should contain:
166
148
"""
167
149
## Getting a list of orders
168
150
@@ -226,8 +208,8 @@ Feature: Generate Slate documentation from test examples
226
208
<code>curl "http://localhost:3000/orders" -X GET \<br> -H "Host: example.org" \<br> -H "Cookie: "</code>
227
209
"""
228
210
229
- Scenario : Example 'Creating an order' file should look like we expect
230
- Then the file "doc/api/orders/creating_an_order .markdown" should contain exactly :
211
+ Scenario : Example 'Creating an order' docs should look like we expect
212
+ Then the file "doc/api/_generated_examples .markdown" should contain:
231
213
"""
232
214
## Creating an order
233
215
@@ -277,17 +259,32 @@ Feature: Generate Slate documentation from test examples
277
259
<code>curl "http://localhost:3000/orders" -d 'name=Order+3&amount=33.0' -X POST \<br> -H "Host: example.org" \<br> -H "Content-Type: application/x-www-form-urlencoded" \<br> -H "Cookie: "</code>
278
260
"""
279
261
280
- Scenario : Example 'Deleting an order' file should be created
281
- Then a file named "doc/api/orders/deleting_an_order.markdown" should exist
262
+ Scenario : Example 'Deleting an order' docs should be created
263
+ Then the file "doc/api/_generated_examples.markdown" should contain:
264
+ """
265
+ ## Deleting an order
266
+ """
282
267
283
- Scenario : Example 'Getting a list of orders' file should be created
284
- Then a file named "doc/api/orders/getting_a_list_of_orders.markdown" should exist
268
+ Scenario : Example 'Getting a list of orders' docs should be created
269
+ Then the file "doc/api/_generated_examples.markdown" should contain:
270
+ """
271
+ ## Getting a list of orders
272
+ """
285
273
286
- Scenario : Example 'Getting a specific order' file should be created
287
- Then a file named "doc/api/orders/getting_a_specific_order.markdown" should exist
274
+ Scenario : Example 'Getting a specific order' docs should be created
275
+ Then the file "doc/api/_generated_examples.markdown" should contain:
276
+ """
277
+ ## Getting a specific order
278
+ """
288
279
289
- Scenario : Example 'Updating an order' file should be created
290
- Then a file named "doc/api/orders/updating_an_order.markdown" should exist
280
+ Scenario : Example 'Updating an order' docs should be created
281
+ Then the file "doc/api/_generated_examples.markdown" should contain:
282
+ """
283
+ ## Updating an order
284
+ """
291
285
292
- Scenario : Example 'Getting welcome message' file should be created
293
- Then a file named "doc/api/help/getting_welcome_message.markdown" should exist
286
+ Scenario : Example 'Getting welcome message' docs should be created
287
+ Then the file "doc/api/_generated_examples.markdown" should contain:
288
+ """
289
+ ## Getting welcome message
290
+ """
0 commit comments