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
4949 RspecApiDocumentation.configure do |config|
5050 config.app = App
5151 config.api_name = "Example API"
52- config.api_explanation = "Description "
52+ config.api_explanation = "An explanation of the API "
5353 config.format = :slate
5454 config.curl_host = 'http://localhost:3000'
5555 config.request_headers_to_include = %w[Content-Type Host]
@@ -293,3 +293,9 @@ Feature: Generate Slate documentation from test examples
293293 """
294294 ## Getting welcome message
295295 """
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
2828 file . write %Q{ - shell: cURL\n }
2929 file . write %Q{---\n \n }
3030
31+ file . write configuration . api_explanation if configuration . api_explanation
32+
3133 IndexHelper . sections ( index . examples , @configuration ) . each do |section |
3234
3335 file . write "# #{ section [ :resource_name ] } \n \n "
You can’t perform that action at this time.
0 commit comments