Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rspec-rails-swagger
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
rspec-rails-swagger
Commits
eb940925
Commit
eb940925
authored
7 years ago
by
liyijie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update spec template for project using
parent
0860a9b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
spec.rb
lib/generators/rspec/swagger/templates/spec.rb
+3
-1
No files found.
lib/generators/rspec/swagger/templates/spec.rb
View file @
eb940925
require
'swagger_helper'
RSpec
.
describe
'<%= controller_path %>'
,
type: :request
do
RSpec
.
describe
'<%= controller_path %>'
,
type: :request
,
capture_examples:
true
,
tags:
[
""
]
do
<
% @routes.each
do
|
template
,
path_item
|
%>
path '<%= template %>
' do
<% unless path_item[:params].empty? -%>
...
...
@@ -16,6 +16,8 @@ RSpec.describe '<%= controller_path %>', type: :request do
<% end -%>
<% path_item[:actions].each do | action, details | -%>
<%= action %>(summary: '
<
%= details[:summary] %>') do
produces 'application/json'
consumes 'application/json'
response(200, description: 'successful') do
# You can add before/let blocks here to trigger the response code
end
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment