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