aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/rake_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/application/rake_test.rb')
-rw-r--r--railties/test/application/rake_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb
index 9b1b24fca1..721a8c978f 100644
--- a/railties/test/application/rake_test.rb
+++ b/railties/test/application/rake_test.rb
@@ -260,5 +260,21 @@ module ApplicationTests
end
end
+ def test_assets_precompile_ignore_asset_host
+ add_to_config <<-RUBY
+ config.action_controller.asset_host = Proc.new { |source, request| "http://www.example.com/" }
+ RUBY
+
+ app_file "app/assets/javascripts/test.js.erb", <<-RUBY
+ alert("<%= asset_path "rails.png" %>");
+ RUBY
+
+ Dir.chdir(app_path) do
+ `rake assets:precompile`
+ open("public/assets/application.js") do |f|
+ assert_match(/\"\/assets\/rails.png\"/, f.read)
+ end
+ end
+ end
end
end