Sha256: fb63d15beec381118a9be1045af1aba4c027c6b4096a4514a88e573115bdf611

Contents?: true

Size: 660 Bytes

Versions: 18

Compression:

Stored size: 660 Bytes

Contents

<% if File.exist?(File.join %w[spec rails_helper.rb]) -%>
require 'rails_helper'
<% else -%>
require 'spec_helper'
<% end -%>

describe "<%= class_name.pluralize %>", type: :request do
<% if method = Rails.application.config.generators.options[:rails][:cancan] -%>
<% method = 'current_user' unless Symbol === method -%>
  before :each do
    allow_any_instance_of(<%= class_name.pluralize %>Controller).to receive(:<%=method%>).and_return(<%=method%>)
  end

<% end -%>
  describe "GET /<%= table_name %>" do
    it "works! (now write some real specs)" do
      get <%= index_helper %>_path
      # expect(response).to have_http_status(200)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rspec_rails_scaffold_templates-3.1.1 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-3.1 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-3.0 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.9 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.6 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.5 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.4 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.3 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.2.1 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.2.0 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.1.0 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-2.0.0 lib/rspec_rails_scaffold_templates/generators/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-1.2.5 lib/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-1.2.4 lib/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-1.2.3 lib/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-1.2.2 lib/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-1.2.1 lib/templates/rspec/integration/request_spec.rb
rspec_rails_scaffold_templates-1.2.0 lib/templates/rspec/integration/request_spec.rb