Adjust Rails Generator

When you use Rails generators to create models or controllers, the
rspec-rails and factory_girl_rails gems will create stub files for your
tests.

When you create a model with rails generate model (see the RailsGuide
for options), the generator will create two test files:

    spec/models/mymodel_spec.rb
    spec/factories/mymodel.rb

When you create a controller with rails generate controller (see the
RailsGuide for options), the generator will create additional test
files:

    spec/controllers/mycontroller_spec.rb
    spec/helpers/my_helper_spec.rb
    spec/views/my_view/

If you use the rails generate scaffold command, you’ll get stub files in
all these directories:

    spec/controllers/
    spec/factories/
    spec/helpers/
    spec/models/
    spec/requests/
    spec/routing/
    spec/views/

Most of these files are clutter, since most developers don’t attempt
such complete test coverage.

Suppress the creation of the extra stub files by adding this block to
the config/application.rb file:

.
.
.
module RailsBootstrap
  class Application < Rails::Application
    .
    .
    .
    config.generators do |g|
      g.test_framework :rspec,
        fixtures: true,
        view_specs: false,
        helper_specs: false,
        routing_specs: false,
        controller_specs: false,
        request_specs: false
      g.fixture_replacement :factory_girl, dir: "spec/factories"
    end

  end
end

This will automatically generate stub files for factories, but nothing
else. If you write additional tests, you can always create the files
manually.