diff options
author | Mark J. Titorenko <mark@titorenko.net> | 2011-10-04 19:02:06 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-10-04 22:04:45 +0200 |
commit | 1f0b78e045f005fee96c11be150549d6092a2177 (patch) | |
tree | eeefe242aa31d8f942df44f4d81c2ced225857ed /railties | |
parent | db262211c983b26ed252a1f1c3bd07fdf128a023 (diff) | |
download | rails-1f0b78e045f005fee96c11be150549d6092a2177.tar.gz rails-1f0b78e045f005fee96c11be150549d6092a2177.tar.bz2 rails-1f0b78e045f005fee96c11be150549d6092a2177.zip |
add failing test: "digested assets are removed from configured path"
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 efbed35bdf..b0748c7572 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -438,6 +438,19 @@ module ApplicationTests assert_equal 1, files.length, "Expected digested application.js asset to be generated, but none found" end + test "digested assets are removed from configured path" do + app_file "public/production_assets/application.js", "alert();" + add_to_env_config "production", "config.assets.prefix = 'production_assets'" + + ENV["RAILS_ENV"] = nil + quietly do + Dir.chdir(app_path){ `bundle exec rake assets:clean` } + end + + files = Dir["#{app_path}/public/production_assets/application.js"] + assert_equal 0, files.length, "Expected application.js asset to be removed, but still exists" + end + private def app_with_assets_in_view |