mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #39661 from hahmed/railties/faster-app-generator-test-for-load-defaults
Make the test AppGeneratorTest#test_new_application_load_defaults faster
This commit is contained in:
commit
e3bc380f0c
2 changed files with 6 additions and 9 deletions
|
@ -2675,6 +2675,12 @@ module ApplicationTests
|
|||
assert_equal true, Rails.application.config.rake_eager_load
|
||||
end
|
||||
|
||||
test "unknown_asset_fallback is false by default" do
|
||||
app "development"
|
||||
|
||||
assert_equal false, Rails.application.config.assets.unknown_asset_fallback
|
||||
end
|
||||
|
||||
private
|
||||
def set_custom_config(contents, config_source = "custom".inspect)
|
||||
app_file "config/custom.yml", contents
|
||||
|
|
|
@ -208,16 +208,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
def test_new_application_load_defaults
|
||||
app_root = File.join(destination_root, "myfirstapp")
|
||||
run_generator [app_root]
|
||||
|
||||
output = nil
|
||||
|
||||
assert_file "#{app_root}/config/application.rb", /\s+config\.load_defaults #{Rails::VERSION::STRING.to_f}/
|
||||
|
||||
Dir.chdir(app_root) do
|
||||
output = `SKIP_REQUIRE_WEBPACKER=true ./bin/rails r "puts Rails.application.config.assets.unknown_asset_fallback"`
|
||||
end
|
||||
|
||||
assert_equal "false\n", output
|
||||
end
|
||||
|
||||
def test_csp_initializer_include_connect_src_example
|
||||
|
|
Loading…
Reference in a new issue