diff options
author | Mark J. Titorenko <mark@titorenko.net> | 2011-10-03 13:42:50 +0100 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-10-03 13:36:26 -0200 |
commit | a7648c213d17f1a58a022fb220efe6310e3f56c3 (patch) | |
tree | 6c3bf0ab8d4214106cfa331be00b0f9ec81966c3 /railties | |
parent | 177ccbf773169a46052a57b369dd0db2f5f896dd (diff) | |
download | rails-a7648c213d17f1a58a022fb220efe6310e3f56c3.tar.gz rails-a7648c213d17f1a58a022fb220efe6310e3f56c3.tar.bz2 rails-a7648c213d17f1a58a022fb220efe6310e3f56c3.zip |
add failing test for #3198
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/assets_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 6fd8808aaa..e0e36063c8 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -425,6 +425,19 @@ module ApplicationTests assert_equal 1, output.scan("enhancement").size 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 def app_with_assets_in_view |