From 3ce3b5b1f1f92d79ee015d246a9f62a725eca5ca Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 31 Aug 2011 18:50:38 -0700 Subject: Merge pull request #2780 from guilleiguaran/assets-pipeline-minor-changes Assets pipeline: fix in manifest location and remove unused code --- railties/test/application/assets_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'railties/test') diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index ccadf0b2c0..721d082908 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -96,6 +96,19 @@ module ApplicationTests 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();" -- cgit v1.2.3