test.rb 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. # Use SQL instead of Active Record's schema dumper when creating the test database.
  33. # This is necessary if your schema can't be completely dumped by the schema dumper,
  34. # like if you have constraints or database-specific column types
  35. # config.active_record.schema_format = :sql
  36. # Print deprecation notices to the stderr
  37. config.active_support.deprecation = :stderr
  38. # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
  39. config.assets.allow_debugging = true
  40. end