Skip to content

Commit

Permalink
Upd features to verify rendered description
Browse files Browse the repository at this point in the history
  • Loading branch information
prikha committed Aug 17, 2017
1 parent 1f786b8 commit 00d4360
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions features/api_blueprint_documentation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Feature: Generate API Blueprint documentation from test examples
RspecApiDocumentation.configure do |config|
config.app = App
config.api_name = "Example API"
config.api_explanation = "Example API Description"
config.format = :api_blueprint
config.request_body_formatter = :json
config.request_headers_to_include = %w[Content-Type Host]
Expand Down
7 changes: 7 additions & 0 deletions features/html_documentation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Feature: Generate HTML documentation from test examples
RspecApiDocumentation.configure do |config|
config.app = App
config.api_name = "Example API"
config.api_explanation = "Example API Description"
config.request_headers_to_include = %w[Cookie]
config.response_headers_to_include = %w[Content-Type]
end
Expand Down Expand Up @@ -66,6 +67,12 @@ Feature: Generate HTML documentation from test examples
| Greetings |
And I should see the api name "Example API"

Scenario: Create an index with proper description
When I open the index
Then I should see the following resources:
| Greetings |
And I should see the api explanation "Example API Description"

Scenario: Example HTML documentation includes the parameters
When I open the index
And I navigate to "Greeting your favorite gem"
Expand Down
2 changes: 2 additions & 0 deletions features/json_iodocs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Feature: Json Iodocs
RspecApiDocumentation.configure do |config|
config.app = App
config.api_name = "app"
config.api_explanation = "desc"
config.format = :json_iodocs
config.io_docs_protocol = "https"
end
Expand Down Expand Up @@ -70,6 +71,7 @@ Feature: Json Iodocs
{
"app" : {
"name" : "app",
"description": "desc",
"protocol" : "https",
"publicPath" : "",
"baseURL" : null
Expand Down
2 changes: 2 additions & 0 deletions features/markdown_documentation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Feature: Generate Markdown documentation from test examples
RspecApiDocumentation.configure do |config|
config.app = App
config.api_name = "Example API"
config.api_explanation = "Example API Description"
config.format = :markdown
config.request_headers_to_include = %w[Content-Type Host]
config.response_headers_to_include = %w[Content-Type Content-Length]
Expand Down Expand Up @@ -148,6 +149,7 @@ Feature: Generate Markdown documentation from test examples
Then the file "doc/api/index.markdown" should contain exactly:
"""
# Example API
Example API Description
## Help
Expand Down
1 change: 1 addition & 0 deletions features/slate_documentation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Feature: Generate Slate documentation from test examples
RspecApiDocumentation.configure do |config|
config.app = App
config.api_name = "Example API"
config.api_explanation = "Description"
config.format = :slate
config.curl_host = 'http://localhost:3000'
config.request_headers_to_include = %w[Content-Type Host]
Expand Down
2 changes: 2 additions & 0 deletions features/textile_documentation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Feature: Generate Textile documentation from test examples
RspecApiDocumentation.configure do |config|
config.app = App
config.api_name = "Example API"
config.api_explanation = "Example API Description"
config.format = :textile
config.request_headers_to_include = %w[Content-Type Host]
config.response_headers_to_include = %w[Content-Type Content-Length]
Expand Down Expand Up @@ -148,6 +149,7 @@ Feature: Generate Textile documentation from test examples
Then the file "doc/api/index.textile" should contain exactly:
"""
h1. Example API
Example API Description
h2. Help
Expand Down

0 comments on commit 00d4360

Please sign in to comment.