views:

96

answers:

1

I installed the current RSpec 2 Beta under Rails 3 RC as mentioned on the GitHub page (and several blogs). Everything works fine, but I am not able to turn off specific generators like advised on some blogs.

Here is what I do in ./config/application.rb:

config.generators do |g|
  g.test_framework :rspec, :fixtures => false, :views => false
end

But when doing a "rails g scaffold Model name:string" those view specs are still generated. What's wrong with my setup?

+2  A: 

You'll want to pass the :view_specs => false option too. I don't know why this is different between the controller generator (where :views => false has effect) and scaffold. I'll ask David.

Ryan Bigg
Thanks for taking care of this. "view_specs => false" works. Is that somewhere documented? With trial and error I also found out that there is a "routing_specs => false". But there is no "model_specs => false" ... I didn't figure that out.
Zardoz
@Zardos: no problem! I just looked in the code for the generator. Whilst it's helpful if you know where to look it would be *really* helpful if this was documented.
Ryan Bigg