Skip to content

Commit 00d4360

Browse files
committed
Upd features to verify rendered description
1 parent 1f786b8 commit 00d4360

6 files changed

+15
-0
lines changed

features/api_blueprint_documentation.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Feature: Generate API Blueprint documentation from test examples
6464
RspecApiDocumentation.configure do |config|
6565
config.app = App
6666
config.api_name = "Example API"
67+
config.api_explanation = "Example API Description"
6768
config.format = :api_blueprint
6869
config.request_body_formatter = :json
6970
config.request_headers_to_include = %w[Content-Type Host]

features/html_documentation.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Feature: Generate HTML documentation from test examples
2424
RspecApiDocumentation.configure do |config|
2525
config.app = App
2626
config.api_name = "Example API"
27+
config.api_explanation = "Example API Description"
2728
config.request_headers_to_include = %w[Cookie]
2829
config.response_headers_to_include = %w[Content-Type]
2930
end
@@ -66,6 +67,12 @@ Feature: Generate HTML documentation from test examples
6667
| Greetings |
6768
And I should see the api name "Example API"
6869

70+
Scenario: Create an index with proper description
71+
When I open the index
72+
Then I should see the following resources:
73+
| Greetings |
74+
And I should see the api explanation "Example API Description"
75+
6976
Scenario: Example HTML documentation includes the parameters
7077
When I open the index
7178
And I navigate to "Greeting your favorite gem"

features/json_iodocs.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Feature: Json Iodocs
2424
RspecApiDocumentation.configure do |config|
2525
config.app = App
2626
config.api_name = "app"
27+
config.api_explanation = "desc"
2728
config.format = :json_iodocs
2829
config.io_docs_protocol = "https"
2930
end
@@ -70,6 +71,7 @@ Feature: Json Iodocs
7071
{
7172
"app" : {
7273
"name" : "app",
74+
"description": "desc",
7375
"protocol" : "https",
7476
"publicPath" : "",
7577
"baseURL" : null

features/markdown_documentation.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Feature: Generate Markdown documentation from test examples
4949
RspecApiDocumentation.configure do |config|
5050
config.app = App
5151
config.api_name = "Example API"
52+
config.api_explanation = "Example API Description"
5253
config.format = :markdown
5354
config.request_headers_to_include = %w[Content-Type Host]
5455
config.response_headers_to_include = %w[Content-Type Content-Length]
@@ -148,6 +149,7 @@ Feature: Generate Markdown documentation from test examples
148149
Then the file "doc/api/index.markdown" should contain exactly:
149150
"""
150151
# Example API
152+
Example API Description
151153
152154
## Help
153155

features/slate_documentation.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +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"
5253
config.format = :slate
5354
config.curl_host = 'http://localhost:3000'
5455
config.request_headers_to_include = %w[Content-Type Host]

features/textile_documentation.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Feature: Generate Textile documentation from test examples
4949
RspecApiDocumentation.configure do |config|
5050
config.app = App
5151
config.api_name = "Example API"
52+
config.api_explanation = "Example API Description"
5253
config.format = :textile
5354
config.request_headers_to_include = %w[Content-Type Host]
5455
config.response_headers_to_include = %w[Content-Type Content-Length]
@@ -148,6 +149,7 @@ Feature: Generate Textile documentation from test examples
148149
Then the file "doc/api/index.textile" should contain exactly:
149150
"""
150151
h1. Example API
152+
Example API Description
151153
152154
h2. Help
153155

0 commit comments

Comments
 (0)