diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/assets_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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" |