1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/per_thread_registry_test.rb
Jean Boussier b4eae47bbe Eliminate internal uses of PerThreadRegistry and deprecate it
This module has been soft deprecated for a long time, but since
it was used internally it wasn't throwing deprecation warnings.

Now we can throw a deprecation warning.
2021-11-22 09:53:16 +01:00

17 lines
359 B
Ruby

# frozen_string_literal: true
require_relative "abstract_unit"
class PerThreadRegistryTest < ActiveSupport::TestCase
class TestRegistry
ActiveSupport::Deprecation.silence do
extend ActiveSupport::PerThreadRegistry
end
def foo(x:); x; end
end
def test_method_missing_with_kwargs
assert_equal 1, TestRegistry.foo(x: 1)
end
end