Skip to content
Browse files

Added test for assets:precompile for index files

  • Loading branch information...
1 parent cf42971 commit 29aa03a46843c3e0461bc4df131d4e8f8d96bc81 @route committed May 1, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 railties/test/application/assets_test.rb
View
9 railties/test/application/assets_test.rb
@@ -114,6 +114,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"

0 comments on commit 29aa03a

Please sign in to comment.
Something went wrong with that request. Please try again.