|
8 | 8 | Rails.application.configure do |
9 | 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. |
12 | | - config.cache_classes = true |
| 11 | + # While tests run files are not watched, reloading is not necessary. |
| 12 | + config.enable_reloading = false |
13 | 13 |
|
14 | | - # Eager loading loads your whole application. When running a single test locally, |
15 | | - # this probably isn't necessary. It's a good idea to do in a continuous integration |
16 | | - # system, or in some way before deploying your code. |
| 14 | + # Eager loading loads your entire application. When running a single test locally, |
| 15 | + # this is usually not necessary, and can slow down your test suite. However, it's |
| 16 | + # recommended that you enable it in continuous integration systems to ensure eager |
| 17 | + # loading is working properly before deploying your code. |
17 | 18 | config.eager_load = ENV["CI"].present? |
18 | 19 |
|
19 | 20 | # Configure public file server for tests with Cache-Control for performance. |
20 | 21 | config.public_file_server.enabled = true |
21 | 22 | config.public_file_server.headers = { |
22 | | - 'Cache-Control' => "public, max-age=#{1.hour.to_i}" |
| 23 | + "Cache-Control" => "public, max-age=#{1.hour.to_i}" |
23 | 24 | } |
24 | 25 |
|
25 | 26 | # Show full error reports and disable caching. |
26 | | - config.consider_all_requests_local = true |
| 27 | + config.consider_all_requests_local = true |
27 | 28 | config.action_controller.perform_caching = false |
28 | 29 | config.cache_store = :null_store |
29 | 30 |
|
30 | | - # Raise exceptions instead of rendering exception templates. |
31 | | - config.action_dispatch.show_exceptions = false |
| 31 | + # Render exception templates for rescuable exceptions and raise for other exceptions. |
| 32 | + config.action_dispatch.show_exceptions = :rescuable |
32 | 33 |
|
33 | 34 | # Disable request forgery protection in test environment. |
34 | 35 | config.action_controller.allow_forgery_protection = false |
|
57 | 58 |
|
58 | 59 | # Annotate rendered view with file names. |
59 | 60 | # config.action_view.annotate_rendered_view_with_filenames = true |
| 61 | + |
| 62 | + # Raise error when a before_action's only/except options reference missing actions |
| 63 | + config.action_controller.raise_on_missing_callback_actions = true |
60 | 64 | end |
0 commit comments