test.rb 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # The test environment is used exclusively to run your application's
  2. # test suite. You never need to work with it otherwise. Remember that
  3. # your test database is "scratch space" for the test suite and is wiped
  4. # and recreated between test runs. Don't rely on the data there!
  5. Rails.application.configure do
  6. # Settings specified here will take precedence over those in config/application.rb.
  7. # While tests run files are not watched, reloading is not necessary.
  8. config.enable_reloading = false
  9. # Eager loading loads your entire application. When running a single test locally,
  10. # this is usually not necessary, and can slow down your test suite. However, it's
  11. # recommended that you enable it in continuous integration systems to ensure eager
  12. # loading is working properly before deploying your code.
  13. config.eager_load = ENV["CI"].present?
  14. # Configure public file server for tests with cache-control for performance.
  15. config.public_file_server.headers = { "cache-control" => "public, max-age=3600" }
  16. # Show full error reports.
  17. config.consider_all_requests_local = true
  18. config.cache_store = :null_store
  19. # Render exception templates for rescuable exceptions and raise for other exceptions.
  20. config.action_dispatch.show_exceptions = :rescuable
  21. # Disable request forgery protection in test environment.
  22. config.action_controller.allow_forgery_protection = false
  23. # Print deprecation notices to the stderr.
  24. config.active_support.deprecation = :stderr
  25. # Raises error for missing translations.
  26. # config.i18n.raise_on_missing_translations = true
  27. # Annotate rendered view with file names.
  28. # config.action_view.annotate_rendered_view_with_filenames = true
  29. # Raise error when a before_action's only/except options reference missing actions.
  30. config.action_controller.raise_on_missing_callback_actions = true
  31. end