mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
set skip_listen
option to dummy appplication
If you want to use `EventedFileUpdateChecker`, need to specify `listen` to plugin's gemspec. However, the default is not specified `listen` to plugin's gemspec, `EventedFileUpdateChecker` should be disabled.
This commit is contained in:
parent
011711ecc9
commit
8e95feb723
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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"])
|
||||
|
|
Loading…
Reference in a new issue