From 8c262f7591d5ea0f26f8edaf50a96d36a2569812 Mon Sep 17 00:00:00 2001 From: kennyj Date: Wed, 21 Mar 2012 02:12:00 +0900 Subject: Fix GH #5411. When precompiling, params method is undefined. --- railties/test/application/assets_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'railties/test/application') diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index ad87d8b6ac..c864d70fa2 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -492,6 +492,18 @@ module ApplicationTests assert_match 'src="/sub/uri/assets/rails.png"', File.read("#{app_path}/public/assets/app.js") end + test "html assets are compiled when executing precompile" do + app_file "app/assets/pages/page.html.erb", "<%= javascript_include_tag :application %>" + ENV["RAILS_ENV"] = "production" + ENV["RAILS_GROUP"] = "assets" + + quietly do + Dir.chdir(app_path){ `bundle exec rake assets:precompile` } + end + + assert File.exists?("#{app_path}/public/assets/page.html") + end + private def app_with_assets_in_view -- cgit v1.2.3