comparison config/environments/test.rb @ 485:6cac8fcf8164

Update to rails 7 (and ruby 3.1)
author nanaya <me@nanaya.pro>
date Sat, 15 Jan 2022 02:07:02 +0900
parents 88fd5722fcb3
children
comparison
equal deleted inserted replaced
484:84ca55a0568e 485:6cac8fcf8164
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 config.cache_classes = true 12 config.cache_classes = true
12 13
13 # Do not eager load code on boot. This avoids loading your whole application 14 # Eager loading loads your whole application. When running a single test locally,
14 # just for the purpose of running a single test. If you are using a tool that 15 # this probably isn't necessary. It's a good idea to do in a continuous integration
15 # preloads Rails for running tests, you may have to set it to true. 16 # system, or in some way before deploying your code.
16 config.eager_load = false 17 config.eager_load = ENV["CI"].present?
17 18
18 # Configure public file server for tests with Cache-Control for performance. 19 # Configure public file server for tests with Cache-Control for performance.
19 config.public_file_server.enabled = true 20 config.public_file_server.enabled = true
20 config.public_file_server.headers = { 21 config.public_file_server.headers = {
21 'Cache-Control' => "public, max-age=#{1.hour.to_i}" 22 "Cache-Control" => "public, max-age=#{1.hour.to_i}"
22 } 23 }
23 24
24 # Show full error reports and disable caching. 25 # Show full error reports and disable caching.
25 config.consider_all_requests_local = true 26 config.consider_all_requests_local = true
26 config.action_controller.perform_caching = false 27 config.action_controller.perform_caching = false