Skip to content

Commit fbd11ab

Browse files
authored
Document new executor_around_test_case in the guides
1 parent a85cfc4 commit fbd11ab

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

guides/source/configuring.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,13 @@ If set to `false`:
14051405
14061406
The default value is `true` for new apps. Upgraded apps will have that value set to `false` for backwards-compatibility.
14071407
1408+
#### `config.active_support.executor_around_test_case`
1409+
1410+
Configure the test suite to call `Rails.application.executor.wrap` around test cases.
1411+
This makes test cases behave closer to an actual request or job.
1412+
Several features that are normally disabled in test, such as Active Record query cache
1413+
and asynchronous queries will then be enabled.
1414+
14081415
#### `ActiveSupport::Logger.silencer`
14091416
14101417
Is set to `false` to disable the ability to silence logging in a block. The default is `true`.
@@ -1721,6 +1728,7 @@ Accepts a string for the HTML tag used to wrap attachments. Defaults to `"action
17211728
- `config.active_support.hash_digest_class`: `OpenSSL::Digest::SHA256`
17221729
- `config.active_support.cache_format_version`: `7.0`
17231730
- `config.active_support.remove_deprecated_time_with_zone_name`: `true`
1731+
- `config.active_support.executor_around_test_case`: `true`
17241732
- `config.action_dispatch.return_only_request_media_type_on_content_type`: `false`
17251733
- `config.action_controller.silence_disabled_session_errors`: `false`
17261734
- `config.action_mailer.smtp_timeout`: `5`
@@ -1807,6 +1815,7 @@ Accepts a string for the HTML tag used to wrap attachments. Defaults to `"action
18071815
- `config.active_support.hash_digest_class`: `OpenSSL::Digest::MD5`
18081816
- `config.active_support.key_generator_hash_digest_class`: `OpenSSL::Digest::SHA1`
18091817
- `config.active_support.cache_format_version`: `6.1`
1818+
- `config.active_support.executor_around_test_case`: `false`
18101819
- `config.action_dispatch.return_only_request_media_type_on_content_type`: `true`
18111820
- `ActiveSupport.utc_to_local_returns_utc_offset_times`: `false`
18121821
- `config.action_mailer.smtp_timeout`: `nil`

railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
# Rails.application.config.active_support.cache_format_version = 7.0
4747

4848
# Calls `Rails.application.executor.wrap` around test cases.
49-
# This makes test cases behave closer to an actual request or job, several
50-
# features that are normally disabled in test, such as Active Record query cache
49+
# This makes test cases behave closer to an actual request or job.
50+
# Several features that are normally disabled in test, such as Active Record query cache
5151
# and asynchronous queries will then be enabled.
5252
# Rails.application.config.active_support.executor_around_test_case = true
5353

0 commit comments

Comments
 (0)