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:
parent
10fb7211bb
commit
3fe6a5d510
7 changed files with 8 additions and 8 deletions
|
@ -40,7 +40,7 @@ module DescendantsTrackerTestCases
|
|||
end
|
||||
end
|
||||
|
||||
protected
|
||||
private
|
||||
|
||||
def assert_equal_sets(expected, actual)
|
||||
assert_equal Set.new(expected), Set.new(actual)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -273,7 +273,7 @@ module Notifications
|
|||
assert !not_child.parent_of?(parent)
|
||||
end
|
||||
|
||||
protected
|
||||
private
|
||||
def random_id
|
||||
@random_id ||= SecureRandom.hex(10)
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue