Sha256: 09b6bf0895d08b6f5192b97a222e6d37b6b80313dc33418c67aaaf913624a418

Contents?: true

Size: 559 Bytes

Versions: 37

Compression:

Stored size: 559 Bytes

Contents

require 'rails_helper'

RSpec.describe "<%= class_name.pluralize %>", <%= type_metatag(:request) %> do
<% namespaced_path = regular_class_path.join('/') -%>
<% if actions.empty? -%>
  describe "GET /index" do
    pending "add some examples (or delete) #{__FILE__}"
  end
<% end -%>
<% for action in actions -%>
  describe "GET /<%= action %>" do
    it "returns http success" do
      get "<%= "/#{namespaced_path}" if namespaced_path != '' %>/<%= file_name %>/<%= action %>"
      expect(response).to have_http_status(:success)
    end
  end

<% end -%>
end

Version data entries

37 entries across 34 versions & 7 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/rspec-rails-7.1.0/lib/generators/rspec/controller/templates/request_spec.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/rspec-rails-7.1.0/lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-7.1.0 lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-7.0.2 lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-7.0.1 lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-7.0.0 lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-6.1.5 lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-6.1.4 lib/generators/rspec/controller/templates/request_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rspec-rails-6.1.3/lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-6.1.3 lib/generators/rspec/controller/templates/request_spec.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/rspec-rails-6.0.4/lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-6.1.2 lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-6.1.1 lib/generators/rspec/controller/templates/request_spec.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rspec-rails-5.1.2/lib/generators/rspec/controller/templates/request_spec.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rspec-rails-5.1.1/lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-6.1.0 lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-6.0.4 lib/generators/rspec/controller/templates/request_spec.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rspec-rails-5.1.2/lib/generators/rspec/controller/templates/request_spec.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rspec-rails-5.1.1/lib/generators/rspec/controller/templates/request_spec.rb
rspec-rails-6.0.3 lib/generators/rspec/controller/templates/request_spec.rb