aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2011-09-22 12:03:59 -0500
committerJosé Valim <jose.valim@gmail.com>2011-09-22 20:54:02 +0200
commit9d46823b5d00e78c6ffaaae731a9a7acf6bb2b14 (patch)
tree1bd2fe641568791b6b468bec58169929556e8669 /railties/test
parent1de89e5e077e2e0948e78af500e78db4daaa03cc (diff)
downloadrails-9d46823b5d00e78c6ffaaae731a9a7acf6bb2b14.tar.gz
rails-9d46823b5d00e78c6ffaaae731a9a7acf6bb2b14.tar.bz2
rails-9d46823b5d00e78c6ffaaae731a9a7acf6bb2b14.zip
set env to let rails know we're precompiling
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/assets_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb
index a62ef1e70e..c4a24f0f73 100644
--- a/railties/test/application/assets_test.rb
+++ b/railties/test/application/assets_test.rb
@@ -102,6 +102,15 @@ module ApplicationTests
assert !File.exists?("#{app_path}/public/assets/something.min.css")
end
+ test "precompile sets flag notifying rails its precompiling" do
+ compile = <<COMPILE
+raise "ENV RAILS_ASSETS_PRECOMPILE not set" unless ENV["RAILS_ASSETS_PRECOMPILE"]
+COMPILE
+ app_file "config/initializers/compile.rb", compile
+ Dir.chdir(app_path){ `bundle exec rake assets:precompile` }
+ assert $?.success?
+ end
+
test "asset pipeline should use a Sprockets::Index when config.assets.digest is true" do
add_to_config "config.assets.digest = true"
add_to_config "config.action_controller.perform_caching = false"