Skip to content

Commit 3fe6a5d

Browse files
committed
Privatize unneededly protected methods in Active Support tests
1 parent 10fb721 commit 3fe6a5d

7 files changed

+8
-8
lines changed

activesupport/test/descendants_tracker_test_cases.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_clear
4040
end
4141
end
4242

43-
protected
43+
private
4444

4545
def assert_equal_sets(expected, actual)
4646
assert_equal Set.new(expected), Set.new(actual)

activesupport/test/json/encoding_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def test_to_json_works_when_as_json_returns_NaN_number
452452
assert_equal '{"number":null}', NaNNumber.new.to_json
453453
end
454454

455-
protected
455+
private
456456

457457
def object_keys(json_object)
458458
json_object[1..-2].scan(/([^{}:,\s]+):/).flatten.sort

activesupport/test/multibyte_conformance_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def test_normalizations_KD
8282
end
8383
end
8484

85-
protected
85+
private
8686
def each_line_of_norm_tests(&block)
8787
File.open(File.join(CACHE_DIR, UNIDATA_FILE), "r") do | f |
8888
until f.eof?

activesupport/test/multibyte_grapheme_break_conformance_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_breaks
2828
end
2929
end
3030

31-
protected
31+
private
3232
def each_line_of_break_tests(&block)
3333
lines = 0
3434
max_test_lines = 0 # Don't limit below 21, because that's the header of the testfile

activesupport/test/multibyte_normalization_conformance_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_normalizations_KD
8383
end
8484
end
8585

86-
protected
86+
private
8787
def each_line_of_norm_tests(&block)
8888
lines = 0
8989
max_test_lines = 0 # Don't limit below 38, because that's the header of the testfile

activesupport/test/notifications_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def test_event_is_parent_based_on_children
273273
assert !not_child.parent_of?(parent)
274274
end
275275

276-
protected
276+
private
277277
def random_id
278278
@random_id ||= SecureRandom.hex(10)
279279
end

activesupport/test/test_case_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def setup
257257
def teardown
258258
end
259259

260-
protected
260+
private
261261

262262
def reset_callback_record
263263
@called_back = []
@@ -282,7 +282,7 @@ def test_inherited_setup_callbacks
282282
assert_equal [:foo, :sentinel, :bar], self.class._teardown_callbacks.map(&:raw_filter)
283283
end
284284

285-
protected
285+
private
286286
def bar
287287
@called_back << :bar
288288
end

0 commit comments

Comments
 (0)