All the RSpec installation instructions I’ve seen (except the RSpec
Book) say something like:
Set up the RSpec generator by adding the following to config/
config.generators do |g|
Create a generator configuration file config/initializers/
Rails.application.config.generators do |g|
g.test_framework = :rspec
Are either of these necessary? It seems when I leave out this step
“rails generate controller home index”
creates all the necessary files in the rspec directory.
Was there a recent improvement that eliminates the need to set up
rspec in config.generators? Or am I missing something?
I’m using Rails 3.0.5 and rspec-rails 2.5.