mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
57e258eb43
commit
1356e53b7c
1 changed files with 14 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue