Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 776
picardo Avatar asked Jul 15 '11 22:07

picardo


1 Answers

config.generators do |g|
  g.test_framework :rspec,
    :view_specs    => false,
    :request_specs => false,
    :routing_specs => false
end

ps - see the docs for more info.

like image 199
David Chelimsky Avatar answered Sep 21 '22 23:09

David Chelimsky