You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.rb 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # frozen_string_literal: true
  2. require 'active_support/core_ext/integer/time'
  3. # The test environment is used exclusively to run your application's
  4. # test suite. You never need to work with it otherwise. Remember that
  5. # your test database is "scratch space" for the test suite and is wiped
  6. # and recreated between test runs. Don't rely on the data there!
  7. Rails.application.configure do
  8. # Settings specified here will take precedence over those in config/application.rb.
  9. config.cache_classes = true
  10. # config.action_view.cache_template_loading = true
  11. # Do not eager load code on boot. This avoids loading your whole application
  12. # just for the purpose of running a single test. If you are using a tool that
  13. # preloads Rails for running tests, you may have to set it to true.
  14. config.eager_load = false
  15. # Configure public file server for tests with Cache-Control for performance.
  16. config.public_file_server.enabled = true
  17. config.public_file_server.headers = {
  18. 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
  19. }
  20. # Show full error reports and disable caching.
  21. config.consider_all_requests_local = true
  22. config.action_controller.perform_caching = false
  23. config.cache_store = :null_store
  24. # Raise exceptions instead of rendering exception templates.
  25. config.action_dispatch.show_exceptions = true
  26. # Disable request forgery protection in test environment.
  27. config.action_controller.allow_forgery_protection = false
  28. # Disable sessions verifications in test environment.
  29. config.redmine_verify_sessions = false
  30. # Store uploaded files on the local file system in a temporary directory.
  31. # config.active_storage.service = :test
  32. config.action_mailer.perform_caching = false
  33. config.action_mailer.perform_deliveries = true
  34. # Tell Action Mailer not to deliver emails to the real world.
  35. # The :test delivery method accumulates sent emails in the
  36. # ActionMailer::Base.deliveries array.
  37. config.action_mailer.delivery_method = :test
  38. # Disable Async delivery
  39. config.active_job.queue_adapter = :inline
  40. # Print deprecation notices to the stderr.
  41. config.active_support.deprecation = [:stderr, :log]
  42. # Raise exceptions for disallowed deprecations.
  43. config.active_support.disallowed_deprecation = :raise
  44. # Tell Active Support which deprecation messages to disallow.
  45. config.active_support.disallowed_deprecation_warnings = []
  46. config.active_support.test_order = :random
  47. # Raises error for missing translations.
  48. # config.i18n.raise_on_missing_translations = true
  49. # Annotate rendered view with file names.
  50. # config.action_view.annotate_rendered_view_with_filenames = true
  51. config.secret_key_base = 'a secret token for running the tests'
  52. end