1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Privatize unneededly protected methods in Active Support tests

This commit is contained in:
Akira Matsuda 2016-12-23 20:31:57 +09:00
parent 10fb7211bb
commit 3fe6a5d510
7 changed files with 8 additions and 8 deletions

View file

@ -40,7 +40,7 @@ module DescendantsTrackerTestCases
end
end
protected
private
def assert_equal_sets(expected, actual)
assert_equal Set.new(expected), Set.new(actual)

View file

@ -452,7 +452,7 @@ EXPECTED
assert_equal '{"number":null}', NaNNumber.new.to_json
end
protected
private
def object_keys(json_object)
json_object[1..-2].scan(/([^{}:,\s]+):/).flatten.sort

View file

@ -82,7 +82,7 @@ class MultibyteConformanceTest < ActiveSupport::TestCase
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?

View file

@ -28,7 +28,7 @@ class MultibyteGraphemeBreakConformanceTest < ActiveSupport::TestCase
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

View file

@ -83,7 +83,7 @@ class MultibyteNormalizationConformanceTest < ActiveSupport::TestCase
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

View file

@ -273,7 +273,7 @@ module Notifications
assert !not_child.parent_of?(parent)
end
protected
private
def random_id
@random_id ||= SecureRandom.hex(10)
end

View file

@ -257,7 +257,7 @@ class SetupAndTeardownTest < ActiveSupport::TestCase
def teardown
end
protected
private
def reset_callback_record
@called_back = []
@ -282,7 +282,7 @@ class SubclassSetupAndTeardownTest < SetupAndTeardownTest
assert_equal [:foo, :sentinel, :bar], self.class._teardown_callbacks.map(&:raw_filter)
end
protected
private
def bar
@called_back << :bar
end