add failing test for #3198

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Mark J. Titorenko 2011-10-03 13:42:50 +01:00 committed by Santiago Pastorino
parent 177ccbf773
commit a7648c213d
1 changed files with 13 additions and 0 deletions

View File

@ -425,6 +425,19 @@ module ApplicationTests
assert_equal 1, output.scan("enhancement").size assert_equal 1, output.scan("enhancement").size
end end
test "digested assets are not mistakenly removed" do
app_file "public/assets/application.js", "alert();"
add_to_config "config.assets.compile = true"
add_to_config "config.assets.digest = true"
quietly do
Dir.chdir(app_path){ `bundle exec rake assets:clean assets:precompile` }
end
files = Dir["#{app_path}/public/assets/application-*.js"]
assert_equal 1, files.length, "Expected digested application.js asset to be generated, but none found"
end
private private
def app_with_assets_in_view def app_with_assets_in_view