require 'spec_helper' describe API::<%= name.capitalize %> do include Rack::Test::Methods def app API::<%= name.capitalize %> end describe 'GET /api/<%= name.downcase %>' do let(:expected_response) { <%= name.downcase %> } it 'returns all <%= name.downcase %>' do get '/api/v1/<%= name.downcase %>' expect(last_response.status).to eq(200) expect(last_response.body).to eq(expected_response) end end