David - Musings of an SRE

Rspec Generator Files

If RSpec for some reason doesn’t generate your spec files when generating models and controllers, add this to your config/application.rb.

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