Mercurial > zeropaste
annotate config/environments/test.rb @ 494:e508d3226214 default tip
Update gems
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 29 Oct 2023 23:24:13 +0900 |
parents | 6cac8fcf8164 |
children |
rev | line source |
---|---|
481 | 1 require "active_support/core_ext/integer/time" |
2 | |
467 | 3 # The test environment is used exclusively to run your application's |
4 # test suite. You never need to work with it otherwise. Remember that | |
5 # your test database is "scratch space" for the test suite and is wiped | |
6 # and recreated between test runs. Don't rely on the data there! | |
7 | |
431 | 8 Rails.application.configure do |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
9 # Settings specified here will take precedence over those in config/application.rb. |
0 | 10 |
485 | 11 # Turn false under Spring and add config.action_view.cache_template_loading = true. |
0 | 12 config.cache_classes = true |
13 | |
485 | 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. | |
17 config.eager_load = ENV["CI"].present? | |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
18 |
431 | 19 # Configure public file server for tests with Cache-Control for performance. |
20 config.public_file_server.enabled = true | |
21 config.public_file_server.headers = { | |
485 | 22 "Cache-Control" => "public, max-age=#{1.hour.to_i}" |
431 | 23 } |
0 | 24 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
25 # Show full error reports and disable caching. |
0 | 26 config.consider_all_requests_local = true |
27 config.action_controller.perform_caching = false | |
467 | 28 config.cache_store = :null_store |
0 | 29 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
30 # Raise exceptions instead of rendering exception templates. |
0 | 31 config.action_dispatch.show_exceptions = false |
32 | |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
33 # Disable request forgery protection in test environment. |
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
34 config.action_controller.allow_forgery_protection = false |
0 | 35 |
202
d4cf49db9c49
...copypasta the whole environments from clean 4.0
Edho Arief <edho@myconan.net>
parents:
201
diff
changeset
|
36 # Print deprecation notices to the stderr. |
0 | 37 config.active_support.deprecation = :stderr |
363
9e860754b5d6
Update renamed config, enforce random test order.
edogawaconan <me@myconan.net>
parents:
205
diff
changeset
|
38 |
481 | 39 # Raise exceptions for disallowed deprecations. |
40 config.active_support.disallowed_deprecation = :raise | |
41 | |
42 # Tell Active Support which deprecation messages to disallow. | |
43 config.active_support.disallowed_deprecation_warnings = [] | |
44 | |
467 | 45 # Raises error for missing translations. |
481 | 46 # config.i18n.raise_on_missing_translations = true |
47 | |
48 # Annotate rendered view with file names. | |
49 # config.action_view.annotate_rendered_view_with_filenames = true | |
0 | 50 end |