rails/activesupport/test
Jean Boussier 2f19782dce ErrorReporter#unexpected to report in production but raise in development
It's a common useful pattern for situation where something isn't
supposed to happen, but if it does we can recover from it.

So in such situation you don't want such issue to be hidden
in development or test, as it's likely a bug, but do not want to
fail a request if it happens in production.

In other words, it behaves like `#record` in development and test
environments, and like `raise` in production.

Fix: https://github.com/rails/rails/pull/49638
Fix: https://github.com/rails/rails/pull/49339

Co-Authored-By: Andrew Novoselac <andrew.novoselac@shopify.com>
Co-Authored-By: Dustin Brown <dbrown9@gmail.com>
2023-11-20 09:42:56 +01:00
..
autoloading_fixtures Delete orphan autoloading fixtures 2021-04-06 20:14:10 +02:00
cache Adjust instr. for Cache::Store#fetch_multi so writes are after reads 2023-11-17 11:33:07 +01:00
concurrency Make AbstractAdapter#lock thread local by default 2022-11-23 14:34:40 +01:00
core_ext Simplify attr_internal_define 2023-10-31 13:42:57 +01:00
dependencies Deletes AS::Dependencies::Blamable 2021-03-08 17:10:42 +01:00
deprecation [Tests only] Enable Minitest/AssertPredicate rule 2023-10-13 19:26:47 +00:00
file_fixtures introduce ActiveSupport::Testing::FileFixtures. 2015-01-28 12:29:34 +01:00
fixtures Concerns learn to be prepended 2020-02-10 02:23:33 +01:00
json Consider Symbol "JSON-ready", improve jsonify 2023-06-30 11:38:38 -07:00
message_pack Fix AS::MessagePack with ENV["RAILS_MAX_THREADS"] 2023-10-01 15:22:05 -05:00
messages Fix decoding data encoded using a non-String purpose 2023-10-17 10:02:10 +02:00
notifications Fix exception guards on multiple subscriber types 2023-10-25 13:55:13 -07:00
testing [Tests only] Enable Minitest/AssertPredicate rule 2023-10-13 19:26:47 +00:00
xml_mini Remove leading whitespace from the XML under test 2021-01-05 22:29:25 -05:00
abstract_unit.rb Get rid of the jruby_skip test helper 2023-10-02 13:01:44 +02:00
actionable_error_test.rb [Tests only] Enable Minitest/AssertPredicate rule 2023-10-13 19:26:47 +00:00
array_inquirer_test.rb Enable Lint/DuplicateMethods rubocop rule 2021-11-15 13:51:28 -05:00
autoload_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
benchmarkable_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
broadcast_logger_test.rb Fix BroadcastLogger#dup so that it duplicates the logger's broadcasts. 2023-10-23 18:12:28 -04:00
callback_inheritance_test.rb Replace ableist language 2021-10-05 22:27:09 -04:00
callbacks_test.rb Add ability to run only before/around/after callbacks in run_callbacks 2022-09-08 14:41:54 +00:00
clean_backtrace_test.rb chore: fix grammar and spelling 2021-04-12 05:30:44 +10:00
clean_logger_test.rb Fix logger format with Ruby 3.1 2021-12-20 22:36:33 +00:00
concern_test.rb Enable Minitest/LiteralAsActualArgument 2023-09-13 10:09:32 +09:00
configurable_test.rb ActiveSupport::Configurable default value option 2021-07-20 10:36:58 -03:00
configuration_file_test.rb Change yaml to YAML 2022-03-29 15:19:22 +10:00
constantize_test_cases.rb Remove DependenciesTestHelpers 2021-04-03 19:24:12 +02:00
constantize_test_helpers.rb Remove DependenciesTestHelpers 2021-04-03 19:24:12 +02:00
current_attributes_test.rb ActiveSupport::CurrentAttributes: raise if a restricted attribute name is used. 2023-01-15 17:07:11 -07:00
deep_mergeable_test.rb Define the method in the right place 2023-09-25 21:04:41 +00:00
dependencies_test.rb Delete the classic version of AS::Dependencies.clear 2021-08-23 10:05:08 +02:00
deprecation_test.rb Formally deprecate passing caller to Deprecation#warn 2023-11-14 10:33:15 +01:00
descendants_tracker_test.rb Filter reloaded classes in Class#subclasses and Class#descendants core exts 2022-09-28 12:08:58 +02:00
digest_test.rb Change the default digest for new apps to SHA256 2021-01-08 12:07:20 +01:00
encrypted_configuration_test.rb Enable Minitest/LiteralAsActualArgument 2023-09-13 10:09:32 +09:00
encrypted_file_test.rb [Tests only] Enable Minitest/AssertPredicate rule 2023-10-13 19:26:47 +00:00
environment_inquirer_test.rb [Tests only] Enable Minitest/AssertPredicate rule 2023-10-13 19:26:47 +00:00
error_reporter_test.rb ErrorReporter#unexpected to report in production but raise in development 2023-11-20 09:42:56 +01:00
evented_file_update_checker_test.rb Improve reliability of EventedFileUpdateCheckerTest fork test 2023-03-24 14:24:07 +01:00
execution_context_test.rb Extract ActiveSupport::ExecutionContext out of ActiveRecord::QueryLogs 2021-11-10 09:36:02 +01:00
executor_test.rb RubyVM class serial is no longer available in Ruby 3.2 2022-12-15 15:45:27 +09:00
file_update_checker_shared_tests.rb Avoid double wait in EventedFileUpdateCheckerTest 2021-07-22 12:29:27 -05:00
file_update_checker_test.rb Avoid double wait in EventedFileUpdateCheckerTest 2021-07-22 12:29:27 -05:00
fork_tracker_test.rb Make ForkTracker.check! a noop on Ruby 3.1+ 2023-02-16 17:32:38 +01:00
gzip_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
hash_with_indifferent_access_test.rb Implement HashWithIndifferentAccess#to_proc 2023-10-03 21:26:08 +03:00
i18n_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
inflector_test_cases.rb Fix humanize for strings ending with id 2023-05-31 02:16:37 +03:00
inflector_test.rb Fix ActiveSupport::Inflector.humanize(nil) 2023-07-25 17:00:28 +01:00
isolated_execution_state_test.rb Introduce ActiveSupport::IsolatedExecutionState for internal use 2021-11-18 15:55:15 +01:00
key_generator_test.rb Don't show secrets for MessageVerifier#inspect and KeyGenerator#inspect 2023-07-06 21:51:22 +02:00
lazy_load_hooks_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
log_subscriber_test.rb ActiveSupport::LogSubscriber restore compatibility with SemanticLogger 2023-10-13 14:21:23 +02:00
logger_test.rb Fix the BroadcastLogger being initialized too late: 2023-09-29 15:42:47 +02:00
message_encryptor_test.rb Don't show secrets for MessageEncryptor#inspect 2023-06-16 21:14:13 +02:00
message_encryptors_test.rb Use throw for message error handling control flow 2023-02-12 15:16:25 -06:00
message_verifier_test.rb Don't show secrets for MessageVerifier#inspect and KeyGenerator#inspect 2023-07-06 21:51:22 +02:00
message_verifiers_test.rb Support Message{Encryptors,Verifiers}#rotate block 2022-12-19 16:35:20 -06:00
multibyte_chars_test.rb Rename behaviour to behavior in test case names 2022-05-26 17:14:18 -04:00
multibyte_proxy_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
multibyte_test_helpers.rb Remove deprecated methods in ActiveSupport::Multibyte::Unicode 2020-10-30 00:26:02 +00:00
notifications_test.rb Stop building AS::Notifications::Event manually 2023-09-29 12:34:23 -04:00
number_helper_i18n_test.rb Add :round_mode parameter support to number helpers 2020-01-05 21:23:02 +00:00
number_helper_test.rb Handle negative numbers in NumberToHumanSizeConverter 2023-10-26 18:07:15 +02:00
option_merger_test.rb Add test coverage for Object#with_options with Hash-like 2023-02-13 22:08:23 -05:00
ordered_hash_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
ordered_options_test.rb Fix OrderedOptions#dig for array indexes 2023-10-20 13:44:33 +03:00
parameter_filter_test.rb Add AS::ParameterFilter.precompile_filters 2022-11-24 10:26:54 -06:00
reloader_test.rb ActiveSupport::Reloader should not report exception 2022-09-22 17:46:18 +02:00
rescuable_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
rotation_coordinator_tests.rb Use SHA256 digest instead of MD4 that is legacy in OpenSSL 3 2023-06-16 13:29:56 +09:00
safe_buffer_test.rb [Tests only] Enable Minitest/AssertPredicate rule 2023-10-13 19:26:47 +00:00
secure_compare_rotator_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
security_utils_test.rb secure_compare: Check byte size instead of length 2021-04-02 12:45:29 -04:00
share_lock_test.rb ShareLock#exclusive and sharing are both public methods 2020-10-02 15:53:47 +09:00
silence_logger_test.rb allow running each test with pure ruby path/to/test.rb 2019-12-18 08:49:19 -06:00
string_inquirer_test.rb Enable Lint/DuplicateMethods rubocop rule 2021-11-15 13:51:28 -05:00
subscriber_test.rb Rename behaviour to behavior in test case names 2022-05-26 17:14:18 -04:00
tagged_logging_test.rb Add a public API for broadcasting logs: 2023-09-25 20:40:51 +00:00
test_case_test.rb Improve error messages of assert_changes and assert_no_changes 2023-10-30 13:30:33 -05:00
time_travel_test.rb Fix time travel helpers to work when nested using with separate classes 2023-10-20 02:46:42 +03:00
time_zone_test_helpers.rb Add ActiveSupport.deprecator 2022-10-25 15:06:39 -05:00
time_zone_test.rb Update ActiveSupport time zone tests for UTC-12 (International Date Line West) 2022-04-11 09:35:41 -05:00
transliterate_test.rb [Tests only] Enable Minitest/AssertPredicate rule 2023-10-13 19:26:47 +00:00
xml_mini_test.rb Allow to opt-in to the new TimeWithZone.name and fix XmlMini serialization 2021-04-12 22:03:31 +02:00