From 1f0b78e045f005fee96c11be150549d6092a2177 Mon Sep 17 00:00:00 2001 From: "Mark J. Titorenko" Date: Tue, 4 Oct 2011 19:02:06 +0100 Subject: add failing test: "digested assets are removed from configured path" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/test/application/assets_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- cgit v1.2.3