diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
| commit | 9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch) | |
| tree | 8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /config/environments/test.rb | |
| parent | 85a01e35274b8d4d4165a7b26bd7986e211246bb (diff) | |
| parent | 1853082fcd8c067390c246f9daa01a9b47387497 (diff) | |
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'config/environments/test.rb')
| -rw-r--r-- | config/environments/test.rb | 68 |
1 files changed, 48 insertions, 20 deletions
diff --git a/config/environments/test.rb b/config/environments/test.rb index 496eb95..bb89065 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb | |||
| @@ -1,27 +1,55 @@ | |||
| 1 | # Settings specified here will take precedence over those in config/environment.rb | ||
| 2 | |||
| 3 | # The test environment is used exclusively to run your application's | 1 | # The test environment is used exclusively to run your application's |
| 4 | # test suite. You never need to work with it otherwise. Remember that | 2 | # 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 | 3 | # 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! | 4 | # and recreated between test runs. Don't rely on the data there! |
| 7 | config.cache_classes = true | 5 | |
| 6 | Rails.application.configure do | ||
| 7 | # Settings specified here will take precedence over those in config/application.rb. | ||
| 8 | |||
| 9 | # While tests run files are not watched, reloading is not necessary. | ||
| 10 | config.enable_reloading = false | ||
| 11 | |||
| 12 | # Eager loading loads your entire application. When running a single test locally, | ||
| 13 | # this is usually not necessary, and can slow down your test suite. However, it's | ||
| 14 | # recommended that you enable it in continuous integration systems to ensure eager | ||
| 15 | # loading is working properly before deploying your code. | ||
| 16 | config.eager_load = ENV["CI"].present? | ||
| 17 | |||
| 18 | # Configure public file server for tests with cache-control for performance. | ||
| 19 | config.public_file_server.headers = { "cache-control" => "public, max-age=3600" } | ||
| 20 | |||
| 21 | # Show full error reports. | ||
| 22 | config.consider_all_requests_local = true | ||
| 23 | config.cache_store = :null_store | ||
| 24 | |||
| 25 | # Render exception templates for rescuable exceptions and raise for other exceptions. | ||
| 26 | config.action_dispatch.show_exceptions = :rescuable | ||
| 27 | |||
| 28 | # Disable request forgery protection in test environment. | ||
| 29 | config.action_controller.allow_forgery_protection = false | ||
| 30 | |||
| 31 | # Store uploaded files on the local file system in a temporary directory. | ||
| 32 | config.active_storage.service = :test | ||
| 33 | |||
| 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 | |||
| 39 | # Set host to be used by links generated in mailer templates. | ||
| 40 | config.action_mailer.default_url_options = { host: "example.com" } | ||
| 8 | 41 | ||
| 9 | # Log error messages when you accidentally call methods on nil. | 42 | # Print deprecation notices to the stderr. |
| 10 | config.whiny_nils = true | 43 | config.active_support.deprecation = :stderr |
| 11 | 44 | ||
| 12 | # Show full error reports and disable caching | 45 | # Raises error for missing translations. |
| 13 | config.action_controller.consider_all_requests_local = true | 46 | # config.i18n.raise_on_missing_translations = true |
| 14 | config.action_controller.perform_caching = false | ||
| 15 | 47 | ||
| 16 | # Disable request forgery protection in test environment | 48 | # Annotate rendered view with file names. |
| 17 | config.action_controller.allow_forgery_protection = false | 49 | # config.action_view.annotate_rendered_view_with_filenames = true |
| 18 | 50 | ||
| 19 | # Tell Action Mailer not to deliver emails to the real world. | 51 | # Raise error when a before_action's only/except options reference missing actions. |
| 20 | # The :test delivery method accumulates sent emails in the | 52 | config.action_controller.raise_on_missing_callback_actions = true |
| 21 | # ActionMailer::Base.deliveries array. | ||
| 22 | config.action_mailer.delivery_method = :test | ||
| 23 | 53 | ||
| 24 | # Use SQL instead of Active Record's schema dumper when creating the test database. | 54 | config.assets.raise_runtime_errors = false |
| 25 | # This is necessary if your schema can't be completely dumped by the schema dumper, | 55 | end |
| 26 | # like if you have constraints or database-specific column types | ||
| 27 | # config.active_record.schema_format = :sql \ No newline at end of file | ||
