Mercurial > rsstweet
comparison config/environments/test.rb @ 254:89f6c0016bab default tip
Update to latest rails
author | nanaya <me@nanaya.net> |
---|---|
date | Tue, 03 Sep 2024 19:21:25 +0900 |
parents | ad6264cca788 |
children |
comparison
equal
deleted
inserted
replaced
253:d726e8b92dd1 | 254:89f6c0016bab |
---|---|
6 # and recreated between test runs. Don't rely on the data there! | 6 # and recreated between test runs. Don't rely on the data there! |
7 | 7 |
8 Rails.application.configure do | 8 Rails.application.configure do |
9 # Settings specified here will take precedence over those in config/application.rb. | 9 # Settings specified here will take precedence over those in config/application.rb. |
10 | 10 |
11 # Turn false under Spring and add config.action_view.cache_template_loading = true. | 11 # While tests run files are not watched, reloading is not necessary. |
12 config.cache_classes = true | 12 config.enable_reloading = false |
13 | 13 |
14 # Eager loading loads your whole application. When running a single test locally, | 14 # Eager loading loads your entire application. When running a single test locally, |
15 # this probably isn't necessary. It's a good idea to do in a continuous integration | 15 # this is usually not necessary, and can slow down your test suite. However, it's |
16 # system, or in some way before deploying your code. | 16 # recommended that you enable it in continuous integration systems to ensure eager |
17 # loading is working properly before deploying your code. | |
17 config.eager_load = ENV["CI"].present? | 18 config.eager_load = ENV["CI"].present? |
18 | 19 |
19 # Configure public file server for tests with Cache-Control for performance. | 20 # Configure public file server for tests with Cache-Control for performance. |
20 config.public_file_server.enabled = true | 21 config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } |
21 config.public_file_server.headers = { | |
22 "Cache-Control" => "public, max-age=#{1.hour.to_i}" | |
23 } | |
24 | 22 |
25 # Show full error reports and disable caching. | 23 # Show full error reports and disable caching. |
26 config.consider_all_requests_local = true | 24 config.consider_all_requests_local = true |
27 config.action_controller.perform_caching = false | 25 config.action_controller.perform_caching = false |
28 config.cache_store = :null_store | 26 config.cache_store = :null_store |
29 | 27 |
30 # Raise exceptions instead of rendering exception templates. | 28 # Render exception templates for rescuable exceptions and raise for other exceptions. |
31 config.action_dispatch.show_exceptions = false | 29 config.action_dispatch.show_exceptions = :rescuable |
32 | 30 |
33 # Disable request forgery protection in test environment. | 31 # Disable request forgery protection in test environment. |
34 config.action_controller.allow_forgery_protection = false | 32 config.action_controller.allow_forgery_protection = false |
35 | 33 |
36 # Print deprecation notices to the stderr. | 34 # Print deprecation notices to the stderr. |
45 # Raises error for missing translations. | 43 # Raises error for missing translations. |
46 # config.i18n.raise_on_missing_translations = true | 44 # config.i18n.raise_on_missing_translations = true |
47 | 45 |
48 # Annotate rendered view with file names. | 46 # Annotate rendered view with file names. |
49 # config.action_view.annotate_rendered_view_with_filenames = true | 47 # config.action_view.annotate_rendered_view_with_filenames = true |
48 | |
49 # Raise error when a before_action's only/except options reference missing actions. | |
50 config.action_controller.raise_on_missing_callback_actions = true | |
50 end | 51 end |