clarion/config/environments/test.rb

68 lines
2.8 KiB
Ruby
Raw Normal View History

2024-02-19 22:06:16 +02:00
require "active_support/core_ext/integer/time"
2024-02-19 21:46:27 +02:00
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
2014-07-28 12:34:18 +03:00
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
2024-02-19 22:21:40 +02:00
# While tests run files are not watched, reloading is not necessary.
config.enable_reloading = false
2014-07-28 12:34:18 +03:00
2024-02-19 22:21:40 +02:00
# Eager loading loads your entire application. When running a single test locally,
# this is usually not necessary, and can slow down your test suite. However, it's
# recommended that you enable it in continuous integration systems to ensure eager
# loading is working properly before deploying your code.
2024-02-19 22:16:52 +02:00
config.eager_load = ENV["CI"].present?
2014-07-28 12:34:18 +03:00
2019-04-28 02:02:09 +03:00
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
2024-02-19 22:16:52 +02:00
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
2019-04-28 02:02:09 +03:00
}
2014-07-28 12:34:18 +03:00
# Show full error reports and disable caching.
2024-02-19 22:21:40 +02:00
config.consider_all_requests_local = true
2014-07-28 12:34:18 +03:00
config.action_controller.perform_caching = false
2024-02-19 21:46:27 +02:00
config.cache_store = :null_store
2014-07-28 12:34:18 +03:00
2024-02-19 22:21:40 +02:00
# Render exception templates for rescuable exceptions and raise for other exceptions.
config.action_dispatch.show_exceptions = :rescuable
2014-07-28 12:34:18 +03:00
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
2019-04-28 02:37:53 +03:00
2024-02-19 21:46:27 +02:00
# Store uploaded files on the local file system in a temporary directory.
2019-04-28 02:37:53 +03:00
config.active_storage.service = :test
2019-04-28 02:02:09 +03:00
config.action_mailer.perform_caching = false
2014-07-28 12:34:18 +03:00
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Use localhost for default host
2019-04-28 21:10:54 +03:00
config.action_mailer.default_url_options = {host: "localhost:3000"}
config.action_mailer.default_options = {from: "no-reply@example.com"}
2014-07-28 12:34:18 +03:00
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
2024-02-19 22:06:16 +02:00
# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
2024-02-19 21:46:27 +02:00
# Raises error for missing translations.
2024-02-19 22:06:16 +02:00
# config.i18n.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
2024-02-19 22:21:40 +02:00
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true
2014-07-28 12:34:18 +03:00
end