aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2016-03-21 15:12:03 -0400
committerArthur Neves <arthurnn@gmail.com>2016-03-21 15:12:03 -0400
commit1356e53b7cb20968c81fbddb71aa378dee80ee03 (patch)
tree936f312432b425dc1891340898cc0ea6d1b79576 /railties/test
parent57e258eb433c9a2f0ee00d1bd562a6d3370c3088 (diff)
downloadrails-1356e53b7cb20968c81fbddb71aa378dee80ee03.tar.gz
rails-1356e53b7cb20968c81fbddb71aa378dee80ee03.tar.bz2
rails-1356e53b7cb20968c81fbddb71aa378dee80ee03.zip
Add tests for file_watcher config on update
[related #24243]
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index f38e773ea8..0572a23df9 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -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]