aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/assets_test.rb12
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