Permalink
Browse files

Manifest should be nil by default. Closes #2776

  • Loading branch information...
guilleiguaran committed Aug 31, 2011
1 parent 15b75b4 commit a4b73638587f256c5e606f603698f3ed496012c5
Showing with 14 additions and 1 deletion.
  1. +1 −1 railties/lib/rails/application/configuration.rb
  2. +13 −0 railties/test/application/assets_test.rb
@@ -43,7 +43,7 @@ def initialize(*)
@assets.debug = false
@assets.compile = true
@assets.digest = false
- @assets.manifest = "#{root}/public#{@assets.prefix}"
+ @assets.manifest = nil
@assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/" ]
@assets.js_compressor = nil
@assets.css_compressor = nil
@@ -96,6 +96,19 @@ def app
assert_match /application-([0-z]+)\.css/, assets["application.css"]
end
+ test "the manifest file should be saved by default in the same assets folder" do
+ app_file "app/assets/javascripts/application.js", "alert();"
+ app_file "config/initializers/manifest.rb", "Rails.application.config.assets.prefix = '/x'"
+
+ capture(:stdout) do
+ Dir.chdir(app_path){ `bundle exec rake assets:precompile` }
+ end
+
+ manifest = "#{app_path}/public/x/manifest.yml"
+ assets = YAML.load_file(manifest)
+ assert_match /application-([0-z]+)\.js/, assets["application.js"]
+ end
+
test "assets do not require any assets group gem when manifest file is present" do
app_file "app/assets/javascripts/application.js", "alert();"

0 comments on commit a4b7363

Please sign in to comment.