File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
lib/rspec_api_documentation/writers Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ Feature: Generate Slate documentation from test examples
49
49
RspecApiDocumentation.configure do |config|
50
50
config.app = App
51
51
config.api_name = "Example API"
52
- config.api_explanation = "Description "
52
+ config.api_explanation = "An explanation of the API "
53
53
config.format = :slate
54
54
config.curl_host = 'http://localhost:3000'
55
55
config.request_headers_to_include = %w[Content-Type Host]
@@ -293,3 +293,9 @@ Feature: Generate Slate documentation from test examples
293
293
"""
294
294
## Getting welcome message
295
295
"""
296
+
297
+ Scenario : API explanation should be included
298
+ Then the file "doc/api/index.html.md" should contain:
299
+ """
300
+ An explanation of the API
301
+ """
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ def write
28
28
file . write %Q{ - shell: cURL\n }
29
29
file . write %Q{---\n \n }
30
30
31
+ file . write configuration . api_explanation if configuration . api_explanation
32
+
31
33
IndexHelper . sections ( index . examples , @configuration ) . each do |section |
32
34
33
35
file . write "# #{ section [ :resource_name ] } \n \n "
You can’t perform that action at this time.
0 commit comments