1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add tests for file_watcher config on update

[related #24243]
This commit is contained in:
Arthur Neves 2016-03-21 15:12:03 -04:00
parent 57e258eb43
commit 1356e53b7c
No known key found for this signature in database
GPG key ID: 04A390FB1E433E17

View file

@ -215,6 +215,20 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
def test_rails_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_rails_update_does_not_create_active_record_belongs_to_required_by_default
app_root = File.join(destination_root, 'myapp')
run_generator [app_root]