Mercurial > rsstweet
comparison config/environments/test.rb @ 223:ad6264cca788
Update to rails 7
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 15 Jan 2022 02:39:53 +0900 |
parents | 2335107f35d0 |
children | 89f6c0016bab |
comparison
equal
deleted
inserted
replaced
222:fefe9b0a603d | 223:ad6264cca788 |
---|---|
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 |