test.rb 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. # Do not eager load code on boot. This avoids loading your whole application
  17. # just for the purpose of running a single test. If you are using a tool that
  18. # preloads Rails for running tests, you may have to set it to true.
  19. config.eager_load = false
  20. # Configure static asset server for tests with Cache-Control for performance.
  21. config.serve_static_assets = true
  22. config.static_cache_control = "public, max-age=3600"
  23. # Show full error reports and disable caching.
  24. config.consider_all_requests_local = true
  25. config.action_controller.perform_caching = false
  26. # Raise exceptions instead of rendering exception templates.
  27. config.action_dispatch.show_exceptions = false
  28. # Disable request forgery protection in test environment.
  29. config.action_controller.allow_forgery_protection = false
  30. # Tell Action Mailer not to deliver emails to the real world.
  31. # The :test delivery method accumulates sent emails in the
  32. # ActionMailer::Base.deliveries array.
  33. config.action_mailer.delivery_method = :test
  34. # Print deprecation notices to the stderr.
  35. config.active_support.deprecation = :stderr
  36. end