diff options
author | kennyj <kennyj@gmail.com> | 2012-03-21 02:12:00 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-03-22 13:25:37 +0900 |
commit | 8c262f7591d5ea0f26f8edaf50a96d36a2569812 (patch) | |
tree | 5550857af30c1f1ac17fb1aefd87b845f21d02a8 /railties/test/application/assets_test.rb | |
parent | 35bf748cd253610b0ee539b3f1f192779405886b (diff) | |
download | rails-8c262f7591d5ea0f26f8edaf50a96d36a2569812.tar.gz rails-8c262f7591d5ea0f26f8edaf50a96d36a2569812.tar.bz2 rails-8c262f7591d5ea0f26f8edaf50a96d36a2569812.zip |
Fix GH #5411. When precompiling, params method is undefined.
Diffstat (limited to 'railties/test/application/assets_test.rb')
-rw-r--r-- | railties/test/application/assets_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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 |