diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 651897d8f3..ef98920c5c 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -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"