Skip to content

Instantly share code, notes, and snippets.

@ngsmrk
Created May 22, 2012 09:15
Show Gist options
  • Save ngsmrk/2767770 to your computer and use it in GitHub Desktop.
Save ngsmrk/2767770 to your computer and use it in GitHub Desktop.
How to config rspec so that view, helper and router specs are not generated when you generate controllers (and factory girl factories are)
In config/application.rb add the following inside the 'class Application < Rails::Application' block
config.generators do | g |
g.test_framework :rspec,
:fixtures => true,
:view_specs => false,
:helper_specs => false,
:routing_specs => false,
:controller_specs => true,
:request_specs => true
g.fixture_replacement :factory_girl, :dir => "spec/factories"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment