diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-02-18 15:08:42 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-02-18 15:08:42 -0200 |
commit | cbaae13430a90fdb24b1f54a52501d88828af723 (patch) | |
tree | c9a2cd81c8978db415cae6e991e69c3225397f8e | |
parent | 13c4cc3b5aea02716b7459c0da641438077f5236 (diff) | |
parent | 8e95feb7234ce62a426418721aecd5e55806507b (diff) | |
download | rails-cbaae13430a90fdb24b1f54a52501d88828af723.tar.gz rails-cbaae13430a90fdb24b1f54a52501d88828af723.tar.bz2 rails-cbaae13430a90fdb24b1f54a52501d88828af723.zip |
Merge pull request #23753 from y-yagi/skip_listen_in_dummy_app
set `skip_listen` option to dummy appplication
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/plugin_generator.rb | 1 | ||||
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index 565764842b..56efd35a95 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -90,6 +90,7 @@ task default: :test opts[:force] = force opts[:skip_bundle] = true opts[:api] = options.api? + opts[:skip_listen] = true invoke Rails::Generators::AppGenerator, [ File.expand_path(dummy_path, destination_root) ], opts diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 4111a30664..d7d27e6b2e 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -444,6 +444,14 @@ class PluginGeneratorTest < Rails::Generators::TestCase end end + def test_dummy_appplication_skip_listen_by_default + run_generator + + assert_file 'test/dummy/config/environments/development.rb' do |contents| + assert_match(/^\s*# config.file_watcher = ActiveSupport::EventedFileUpdateChecker/, contents) + end + end + def test_ensure_that_gitignore_can_be_generated_from_a_template_for_dummy_path FileUtils.cd(Rails.root) run_generator([destination_root, "--dummy_path", "spec/dummy", "--skip-test"]) |