Skip to content

Instantly share code, notes, and snippets.

@andriy-baran
Last active June 27, 2018 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andriy-baran/504c3cb02ec507196d261555541a7109 to your computer and use it in GitHub Desktop.
Save andriy-baran/504c3cb02ec507196d261555541a7109 to your computer and use it in GitHub Desktop.
RSpec.describe '', type: :request do
include_context 'api session'
<% @path_params.each do |param| %>
<%= "let(#{param}) { #{rand(99..500)} }" %>
<% end %>
let(:path) { "<%= @path %>" }
let(:valid_params) { {} }
let(:valid_response) { {} }
describe '<%= @http_verb.upcase %> <%= controller %>#<%= file_name %>' do
it_behaves_like 'protected endpoint', :<%= @http_verb.downcase %>
context '' do
xit 'renders correct response' do
do_<%= @http_verb.downcase %>
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment