Does Rails 4.2 provide a single command that regenerates config/application.rb in an existing application?
The reason I ask is imagine a Rails app is rails new-ed without the --skip-test-unit option.
Then at a much later date, this app is switched to RSpec. How can config/application.rb be regenerated as if the --skip-test-unit option had been supplied originally to rails new ...?
All this would effectively do is change the require statements near the top of config/application.rb file from:
require 'rails/all'
to:
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
Delete the existing
config/application.rband, in the directory above the project root, runrails new ...with the options you want, including the application directory name, and the--skip-test-unitoption, and the--skipoption, which makesrails new ...skip creating files that already exist:And that's it!