'Disable generation of requests and routing specs? [RSPEC]

Whenever I generate a scaffold, Rspec generator always creates specs like the following:

  invoke    rspec
  create      spec/controllers/stars_controller_spec.rb
  invoke      helper
  create      spec/routing/stars_routing_spec.rb
  invoke      rspec
  create        spec/requests/stars_spec.rb

How can I make sure that these are never generated? I tried setting configuration settings like this, but it didn't help:

  config.generators do |g|
   g.test_framework :rspec, :fixture => true, :views => false
   g.view_specs false
   g.integration_specs false
   g.helper_specs false
  end


Solution 1:[1]

How can you find these options?

Documentation can be out of date. However, the list of options can be found in RSpec Rails library.

class_option :controller_specs, type: :boolean, default: false, desc: "Generate controller specs"
class_option :request_specs,    type: :boolean, default: true,  desc: "Generate request specs"
class_option :view_specs,       type: :boolean, default: true,  desc: "Generate view specs"
class_option :helper_specs,     type: :boolean, default: true,  desc: "Generate helper specs"
class_option :routing_specs,    type: :boolean, default: true,  desc: "Generate routing specs"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 notapatch