提交 3fe6a5d5 编写于 作者: A Akira Matsuda

Privatize unneededly protected methods in Active Support tests

上级 10fb7211
......@@ -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)
......
......@@ -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
......
......@@ -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?
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册