rails/activesupport/test
David Heinemeier Hansson 24a864437e ActiveSupport::CurrentAttributes provides a thread-isolated attributes singleton (#29180)
* Add ActiveSupport::CurrentAttributes to provide a thread-isolated attributes singleton

* Need to require first

* Move stubs into test namespace.

Thus they won't conflict with other Current and Person stubs.

* End of the line for you, whitespace!

* Support super in attribute methods.

Define instance level accessors in an included module such that
`super` in an overriden accessor works, akin to Active Model.

* Spare users the manual require.

Follow the example of concerns, autoload in the top level Active Support file.

* Add bidelegation support

* Rename #expose to #set. Simpler, clearer

* Automatically reset every instance.

Skips the need for users to actively embed something that resets
their CurrentAttributes instances.

* Fix test name; add tangible name value when blank.

* Try to ensure we run after a request as well.

* Delegate all missing methods to the instance

This allows regular `delegate` to serve, so we don't need bidelegate.

* Properly test resetting after execution cycle.

Also remove the stale puts debugging.

* Update documentation to match new autoreset
2017-05-26 20:00:27 +02:00
..
autoloading_fixtures Correct spelling 2017-02-05 19:00:18 -06:00
core_ext Fix implicit calculations with scalars and durations 2017-05-20 16:36:25 +01:00
dependencies
deprecation
file_fixtures
fixtures
json Add missing requires 2017-02-22 13:25:44 +00:00
notifications Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
testing Define path with __dir__ 2017-05-23 00:53:51 +03:00
xml_mini Define path with __dir__ 2017-05-23 00:53:51 +03:00
abstract_unit.rb Don't pollute Object with rubinius_skip and jruby_skip 2017-01-17 18:51:50 +09:00
array_inquirer_test.rb It would be safer not to totally undef core classes' respond_to_missing? 2017-01-15 04:42:03 +09:00
autoload_test.rb improve error message when include assertions fail 2016-09-16 12:03:37 -07:00
benchmarkable_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
broadcast_logger_test.rb Merge pull request #26874 from tgxworld/fix_broadcast_logger 2016-11-25 15:57:50 +10:30
caching_test.rb Use recyclable cache keys (#29092) 2017-05-18 18:12:32 +02:00
callback_inheritance_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
callbacks_test.rb Remove deprecated behavior that halts callbacks when the return is false 2017-02-07 12:19:37 -03:00
class_cache_test.rb "Use assert_nil if expecting nil. This will fail in minitest 6." 2016-12-25 02:29:52 +09:00
clean_backtrace_test.rb
clean_logger_test.rb
concern_test.rb use public Module#include instead of send :include 2016-11-27 22:20:52 +09:00
configurable_test.rb improve error message when include assertions fail 2016-09-16 12:03:37 -07:00
constantize_test_cases.rb Fix constantize edge case involving prepend, autoloading and name conflicts 2016-12-14 14:25:43 +01:00
current_attributes_test.rb ActiveSupport::CurrentAttributes provides a thread-isolated attributes singleton (#29180) 2017-05-26 20:00:27 +02:00
dependencies_test_helpers.rb Define path with __dir__ 2017-05-23 00:53:51 +03:00
dependencies_test.rb Define path with __dir__ 2017-05-23 00:53:51 +03:00
deprecation_test.rb Send deprecation horizon and gem name as arguments to deprecation heavier handler, and make sure they are used for the ActiveSupport::Notifications message. 2017-04-19 18:23:28 -04:00
descendants_tracker_test_cases.rb Privatize unneededly protected methods in Active Support tests 2016-12-24 00:22:29 +09:00
descendants_tracker_with_autoloading_test.rb
descendants_tracker_without_autoloading_test.rb
evented_file_update_checker_test.rb Correct spelling 2017-02-05 19:00:18 -06:00
executor_test.rb "Use assert_nil if expecting nil. This will fail in minitest 6." 2016-12-25 02:29:52 +09:00
file_update_checker_shared_tests.rb remove unused variable 2017-02-01 08:20:13 +09:00
file_update_checker_test.rb
gzip_test.rb Add missing gzip footer check in ActiveSupport::Gzip.decompress 2017-02-24 17:33:36 -05:00
hash_with_indifferent_access_test.rb Implement fetch_values for HashWithIndifferentAccess (#28316) 2017-04-10 10:20:13 +09:30
i18n_test.rb
inflector_test_cases.rb Merge pull request #28480 from mubashirhanif/add_keep_id_suffix_option_to_humanize_new 2017-03-28 17:57:17 -04:00
inflector_test.rb Merge pull request #28480 from mubashirhanif/add_keep_id_suffix_option_to_humanize_new 2017-03-28 17:57:17 -04:00
key_generator_test.rb
lazy_load_hooks_test.rb
log_subscriber_test.rb
logger_test.rb improve error message when include assertions fail 2016-09-16 12:03:37 -07:00
message_encryptor_test.rb Updates to MessageEncryptor AEAD tests 2017-05-15 08:55:46 +00:00
message_verifier_test.rb assert_equal takes expectation first 2016-12-26 11:04:56 +09:00
multibyte_chars_test.rb Add Style/EmptyLinesAroundMethodBody in .rubocop.yml and remove extra empty lines 2017-02-12 20:44:15 +09:00
multibyte_conformance_test.rb Privatize unneededly protected methods in Active Support tests 2016-12-24 00:22:29 +09:00
multibyte_grapheme_break_conformance_test.rb Privatize unneededly protected methods in Active Support tests 2016-12-24 00:22:29 +09:00
multibyte_normalization_conformance_test.rb Privatize unneededly protected methods in Active Support tests 2016-12-24 00:22:29 +09:00
multibyte_proxy_test.rb
multibyte_test_helpers.rb Update Unicode Version to 9.0.0 2017-01-28 16:57:36 +09:00
multibyte_unicode_database_test.rb
notifications_test.rb Privatize unneededly protected methods in Active Support tests 2016-12-24 00:22:29 +09:00
number_helper_i18n_test.rb Missing require 'active_support/core_ext/hash/keys' 2017-01-29 08:41:06 +09:00
number_helper_test.rb Remove deprecated :prefix option 2016-11-13 23:09:03 +00:00
option_merger_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
ordered_hash_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
ordered_options_test.rb
reloader_test.rb Remove deprecated callbacks from ActionDispatch middlewares 2017-01-31 15:52:12 -05:00
rescuable_test.rb handle loops in the cause chain in Rescuable#rescue_with_handler 2017-05-10 13:33:46 -04:00
safe_buffer_test.rb "Use assert_nil if expecting nil from ...:in `...'. This will fail in minitest 6." 2016-12-25 13:15:56 +09:00
security_utils_test.rb Add test for variable_size_secure_compare 2017-01-31 20:41:14 +09:00
share_lock_test.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
string_inquirer_test.rb Should do nothing here 2017-01-16 12:33:37 +09:00
subscriber_test.rb
tagged_logging_test.rb
test_case_test.rb Remove unused test class 2017-05-26 13:23:51 +09:00
time_travel_test.rb Should escape meta characters in regexp 2017-05-07 04:10:00 +09:00
time_zone_test_helpers.rb
time_zone_test.rb Return unmapped timezones from country_zones 2017-03-28 13:33:32 +01:00
transliterate_test.rb Raise ArgumentError if attempting to transliterate anything that is not a string 2017-01-16 14:40:41 -05:00
xml_mini_test.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00