test.rb 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #---
  2. # Excerpted from "Agile Web Development with Rails",
  3. # published by The Pragmatic Bookshelf.
  4. # Copyrights apply to this code. It may not be used to create training material,
  5. # courses, books, articles, and the like. Contact us if you are in doubt.
  6. # We make no guarantees that this code is fit for any purpose.
  7. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  8. #---
  9. Depot::Application.configure do
  10. # Settings specified here will take precedence over those in config/application.rb
  11. # The test environment is used exclusively to run your application's
  12. # test suite. You never need to work with it otherwise. Remember that
  13. # your test database is "scratch space" for the test suite and is wiped
  14. # and recreated between test runs. Don't rely on the data there!
  15. config.cache_classes = true
  16. # Configure static asset server for tests with Cache-Control for performance
  17. config.serve_static_assets = true
  18. config.static_cache_control = "public, max-age=3600"
  19. # Log error messages when you accidentally call methods on nil
  20. config.whiny_nils = true
  21. # Show full error reports and disable caching
  22. config.consider_all_requests_local = true
  23. config.action_controller.perform_caching = false
  24. # Raise exceptions instead of rendering exception templates
  25. config.action_dispatch.show_exceptions = false
  26. # Disable request forgery protection in test environment
  27. config.action_controller.allow_forgery_protection = false
  28. # Tell Action Mailer not to deliver emails to the real world.
  29. # The :test delivery method accumulates sent emails in the
  30. # ActionMailer::Base.deliveries array.
  31. config.action_mailer.delivery_method = :test
  32. # Raise exception on mass assignment protection for Active Record models
  33. config.active_record.mass_assignment_sanitizer = :strict
  34. # Print deprecation notices to the stderr
  35. config.active_support.deprecation = :stderr
  36. end