aboutsummaryrefslogtreecommitdiffstats
path: root/guides/code/getting_started/config/environments/test.rb
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2013-01-22 00:12:29 -0500
committerSteve Klabnik <steve@steveklabnik.com>2013-01-22 00:12:29 -0500
commit2214237c3950445208635a332d520d6aa530c1de (patch)
tree13037ba04286f9d03d5fab5606aadd436b9719e8 /guides/code/getting_started/config/environments/test.rb
parent51b9def5bf108fb566e0d2293f49abb5aeb0add7 (diff)
downloadrails-2214237c3950445208635a332d520d6aa530c1de.tar.gz
rails-2214237c3950445208635a332d520d6aa530c1de.tar.bz2
rails-2214237c3950445208635a332d520d6aa530c1de.zip
Re-do Getting Started application with Rails 4.
The sample application with the Getting Started Guide was very out of date. I've re-done it on edge (as of 51b9def5bf108fb566e) so it should be good to go with Rails 4. It's also in synch with what the guide actually says.
Diffstat (limited to 'guides/code/getting_started/config/environments/test.rb')
-rw-r--r--guides/code/getting_started/config/environments/test.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/guides/code/getting_started/config/environments/test.rb b/guides/code/getting_started/config/environments/test.rb
index f2bc932fb3..00adaa5015 100644
--- a/guides/code/getting_started/config/environments/test.rb
+++ b/guides/code/getting_started/config/environments/test.rb
@@ -2,11 +2,16 @@ Blog::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
+ # 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!
+ # and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
+ # 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
+ # preloads Rails for running tests, you may have to set it to true.
+ config.eager_load = false
+
# Configure static asset server for tests with Cache-Control for performance.
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
@@ -26,9 +31,6 @@ Blog::Application.configure do
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
- # Raise exception on mass assignment protection for Active Record models.
- config.active_record.mass_assignment_sanitizer = :strict
-
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
end