Skip to content

Commit ea5cd29

Browse files
committed
Exec 'bin/rails app:update' for config/environments/test.rb
1 parent d037186 commit ea5cd29

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

config/environments/test.rb

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,28 @@
88
Rails.application.configure do
99
# Settings specified here will take precedence over those in config/application.rb.
1010

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
1313

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.
1718
config.eager_load = ENV["CI"].present?
1819

1920
# Configure public file server for tests with Cache-Control for performance.
2021
config.public_file_server.enabled = true
2122
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}"
2324
}
2425

2526
# Show full error reports and disable caching.
26-
config.consider_all_requests_local = true
27+
config.consider_all_requests_local = true
2728
config.action_controller.perform_caching = false
2829
config.cache_store = :null_store
2930

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
3233

3334
# Disable request forgery protection in test environment.
3435
config.action_controller.allow_forgery_protection = false
@@ -57,4 +58,7 @@
5758

5859
# Annotate rendered view with file names.
5960
# 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
6064
end

0 commit comments

Comments
 (0)