diff --git a/activesupport/test/descendants_tracker_test_cases.rb b/activesupport/test/descendants_tracker_test_cases.rb index 09c5ce1f07a25fb5c34a2f0cbe407f22b9952413..cf349d53ee4a89ae79d3f8af2931a6d2df417584 100644 --- a/activesupport/test/descendants_tracker_test_cases.rb +++ b/activesupport/test/descendants_tracker_test_cases.rb @@ -40,7 +40,7 @@ def test_clear end end - protected + private def assert_equal_sets(expected, actual) assert_equal Set.new(expected), Set.new(actual) diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index fa518104c2ce2e6e51ed60fa38419930bbf4c00f..8893b9d4756087a46f5945910ebcbd98c65ee97f 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -452,7 +452,7 @@ def test_to_json_works_when_as_json_returns_NaN_number assert_equal '{"number":null}', NaNNumber.new.to_json end - protected + private def object_keys(json_object) json_object[1..-2].scan(/([^{}:,\s]+):/).flatten.sort diff --git a/activesupport/test/multibyte_conformance_test.rb b/activesupport/test/multibyte_conformance_test.rb index bf004d7924af54f75f55e8347569db6cd456c3d1..ef1a26135f296c53140de6f6ea130b751c39915c 100644 --- a/activesupport/test/multibyte_conformance_test.rb +++ b/activesupport/test/multibyte_conformance_test.rb @@ -82,7 +82,7 @@ def test_normalizations_KD end end - protected + private def each_line_of_norm_tests(&block) File.open(File.join(CACHE_DIR, UNIDATA_FILE), "r") do | f | until f.eof? diff --git a/activesupport/test/multibyte_grapheme_break_conformance_test.rb b/activesupport/test/multibyte_grapheme_break_conformance_test.rb index 04a7d290d996494c58a10541cf719037f775cd4b..b3328987aedb28aa7db8434a94f1c9e4a8b07050 100644 --- a/activesupport/test/multibyte_grapheme_break_conformance_test.rb +++ b/activesupport/test/multibyte_grapheme_break_conformance_test.rb @@ -28,7 +28,7 @@ def test_breaks end end - protected + private def each_line_of_break_tests(&block) lines = 0 max_test_lines = 0 # Don't limit below 21, because that's the header of the testfile diff --git a/activesupport/test/multibyte_normalization_conformance_test.rb b/activesupport/test/multibyte_normalization_conformance_test.rb index e013bd578f35cadc6b6f16909e169bdf1ed26a58..ebc9f92d23ce2886ad9e414a24a8c93da8a6a668 100644 --- a/activesupport/test/multibyte_normalization_conformance_test.rb +++ b/activesupport/test/multibyte_normalization_conformance_test.rb @@ -83,7 +83,7 @@ def test_normalizations_KD end end - protected + private def each_line_of_norm_tests(&block) lines = 0 max_test_lines = 0 # Don't limit below 38, because that's the header of the testfile diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb index a6f0d82e8aa48e1c219e4a053ef95c0c2be48f42..11f743519f7a3be03d64221d18c01a1c6ddaae6a 100644 --- a/activesupport/test/notifications_test.rb +++ b/activesupport/test/notifications_test.rb @@ -273,7 +273,7 @@ def test_event_is_parent_based_on_children assert !not_child.parent_of?(parent) end - protected + private def random_id @random_id ||= SecureRandom.hex(10) end diff --git a/activesupport/test/test_case_test.rb b/activesupport/test/test_case_test.rb index d769a8c14560de2908b0175d8b9662a812c8488c..af7fc44d6633aa69e1d0e408065a3e2689236fd7 100644 --- a/activesupport/test/test_case_test.rb +++ b/activesupport/test/test_case_test.rb @@ -257,7 +257,7 @@ def setup def teardown end - protected + private def reset_callback_record @called_back = [] @@ -282,7 +282,7 @@ def test_inherited_setup_callbacks assert_equal [:foo, :sentinel, :bar], self.class._teardown_callbacks.map(&:raw_filter) end - protected + private def bar @called_back << :bar end