提交 b5dc9c1a 编写于 作者: M Matthew Draper 提交者: GitHub

Merge pull request #28523 from y-yagi/dont_comment_out_file_watcher_during_rails_upgrade_process

Don't comment out config.file_watcher during Rails upgrade
......@@ -109,8 +109,6 @@ def config_when_updating
config
gsub_file "config/environments/development.rb", /^(\s+)config\.file_watcher/, '\1# config.file_watcher'
unless cookie_serializer_config_exist
gsub_file "config/initializers/cookies_serializer.rb", /json(?!,)/, "marshal"
end
......
......@@ -199,20 +199,6 @@ def test_app_update_set_the_cookie_serializer_to_marshal_if_it_is_not_already_co
end
end
def test_app_update_dont_set_file_watcher
app_root = File.join(destination_root, "myapp")
run_generator [app_root]
stub_rails_application(app_root) do
generator = Rails::Generators::AppGenerator.new ["rails"], [], destination_root: app_root, shell: @shell
generator.send(:app_const)
quietly { generator.send(:update_config_files) }
assert_file "#{app_root}/config/environments/development.rb" do |content|
assert_match(/# config.file_watcher/, content)
end
end
end
def test_app_update_create_new_framework_defaults
app_root = File.join(destination_root, "myapp")
run_generator [app_root]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册