Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added test for assets:precompile for index files

  • Loading branch information...
commit 580e767a8e12ee15ac367e6f89489e4ad6d863cc 1 parent df84577
@route route authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 railties/test/application/assets_test.rb
View
9 railties/test/application/assets_test.rb
@@ -110,6 +110,15 @@ def precompile!
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"
Please sign in to comment.
Something went wrong with that request. Please try again.