mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix Sprockets::DoubleLinkError in test
This commit is contained in:
parent
fe852341ec
commit
4cb93a39e2
1 changed files with 5 additions and 0 deletions
|
@ -172,6 +172,7 @@ module ApplicationTests
|
|||
|
||||
test "sprockets cache is not shared between environments" do
|
||||
app_file "app/assets/images/rails.png", "notactuallyapng"
|
||||
remove_file "app/assets/stylesheets/application.css"
|
||||
app_file "app/assets/stylesheets/application.css.erb", "body { background: '<%= asset_path('rails.png') %>'; }"
|
||||
add_to_env_config "production", 'config.assets.prefix = "production_assets"'
|
||||
|
||||
|
@ -220,6 +221,7 @@ module ApplicationTests
|
|||
|
||||
test "precompile creates a manifest file with all the assets listed" do
|
||||
app_file "app/assets/images/rails.png", "notactuallyapng"
|
||||
remove_file "app/assets/stylesheets/application.css"
|
||||
app_file "app/assets/stylesheets/application.css.erb", "<%= asset_path('rails.png') %>"
|
||||
app_file "app/assets/javascripts/application.js", "alert();"
|
||||
|
||||
|
@ -264,6 +266,7 @@ module ApplicationTests
|
|||
|
||||
test "precompile properly refers files referenced with asset_path" do
|
||||
app_file "app/assets/images/rails.png", "notactuallyapng"
|
||||
remove_file "app/assets/stylesheets/application.css"
|
||||
app_file "app/assets/stylesheets/application.css.erb", "p { background-image: url(<%= asset_path('rails.png') %>) }"
|
||||
|
||||
precompile!
|
||||
|
@ -275,6 +278,7 @@ module ApplicationTests
|
|||
test "precompile shouldn't use the digests present in manifest.json" do
|
||||
app_file "app/assets/images/rails.png", "notactuallyapng"
|
||||
|
||||
remove_file "app/assets/stylesheets/application.css"
|
||||
app_file "app/assets/stylesheets/application.css.erb", "p { background-image: url(<%= asset_path('rails.png') %>) }"
|
||||
|
||||
precompile! RAILS_ENV: "production"
|
||||
|
@ -293,6 +297,7 @@ module ApplicationTests
|
|||
|
||||
test "precompile appends the MD5 hash to files referenced with asset_path and run in production with digest true" do
|
||||
app_file "app/assets/images/rails.png", "notactuallyapng"
|
||||
remove_file "app/assets/stylesheets/application.css"
|
||||
app_file "app/assets/stylesheets/application.css.erb", "p { background-image: url(<%= asset_path('rails.png') %>) }"
|
||||
|
||||
precompile! RAILS_ENV: "production"
|
||||
|
|
Loading…
Reference in a new issue