aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2019-04-14 23:06:32 +0200
committerXavier Noria <fxn@hashref.com>2019-04-14 23:09:02 +0200
commit65344f254cde87950c7f176cb7aa09c002a6f882 (patch)
tree11ad1457babf3cfa23c6e5afeaa16fb89f51824f /railties/lib
parent1e4b959c5ead67c97941ba59c1e4ec4958010066 (diff)
downloadrails-65344f254cde87950c7f176cb7aa09c002a6f882.tar.gz
rails-65344f254cde87950c7f176cb7aa09c002a6f882.tar.bz2
rails-65344f254cde87950c7f176cb7aa09c002a6f882.zip
generate config.cache_classes = false if Spring
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt15
1 files changed, 10 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
index 63ed3fa952..c66e349442 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
@@ -1,11 +1,16 @@
+# The test environment is used exclusively to run your application's
+# test suite. You never need to work with it otherwise. Remember that
+# your test database is "scratch space" for the test suite and is wiped
+# and recreated between test runs. Don't rely on the data there!
+
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
-
- # The test environment is used exclusively to run your application's
- # test suite. You never need to work with it otherwise. Remember that
- # your test database is "scratch space" for the test suite and is wiped
- # and recreated between test runs. Don't rely on the data there!
+ <%# Spring executes the reloaders when files change. %>
+ <%- if spring_install? -%>
+ config.cache_classes = false
+ <%- else -%>
config.cache_classes = true
+ <%- end -%>
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that