aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb14
-rw-r--r--railties/test/generators/mailer_generator_test.rb2
2 files changed, 15 insertions, 1 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]
diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb
index 71c11e5ef6..8728b39dae 100644
--- a/railties/test/generators/mailer_generator_test.rb
+++ b/railties/test/generators/mailer_generator_test.rb
@@ -16,7 +16,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase
assert_file 'app/mailers/application_mailer.rb' do |mailer|
assert_match(/class ApplicationMailer < ActionMailer::Base/, mailer)
assert_match(/default from: 'from@example.com'/, mailer)
- assert_match(/layout :mailer/, mailer)
+ assert_match(/layout 'mailer'/, mailer)
end
end