From 580e767a8e12ee15ac367e6f89489e4ad6d863cc Mon Sep 17 00:00:00 2001 From: Dmitry Vorotilin Date: Tue, 1 May 2012 13:26:04 +0400 Subject: Added test for assets:precompile for index files --- railties/test/application/assets_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'railties/test/application/assets_test.rb') diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index c864d70fa2..673a403fd3 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -110,6 +110,15 @@ module ApplicationTests assert !File.exists?("#{app_path}/public/assets/something.else.css") end + test "precompile something.js for directory containing index file" do + add_to_config "config.assets.precompile = [ 'something.js' ]" + app_file "app/assets/javascripts/something/index.js.erb", "alert();" + + precompile! + + assert File.exists?("#{app_path}/public/assets/something.js") + end + test "asset pipeline should use a Sprockets::Index when config.assets.digest is true" do add_to_config "config.assets.digest = true" add_to_config "config.action_controller.perform_caching = false" -- cgit v1.2.3