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

Delete evented_file_update_checker existing_parent

This is no longer used as of caa3cc8868
This commit is contained in:
John Hawthorn 2019-05-22 16:59:06 -07:00
parent a85c372798
commit f3bb3f1c4e
2 changed files with 0 additions and 15 deletions

View file

@ -187,13 +187,6 @@ module ActiveSupport
lcsp
end
# Returns the deepest existing ascendant, which could be the argument itself.
def existing_parent(dir)
dir.ascend do |ascendant|
break ascendant if ascendant.directory?
end
end
# Filters out directories which are descendants of others in the collection (stable).
def filter_out_descendants(dirs)
return dirs if dirs.length < 2

View file

@ -156,14 +156,6 @@ class EventedFileUpdateCheckerPathHelperTest < ActiveSupport::TestCase
assert_nil @ph.longest_common_subpath([])
end
test "#existing_parent returns the most specific existing ascendant" do
wd = Pathname.getwd
assert_equal wd, @ph.existing_parent(wd)
assert_equal wd, @ph.existing_parent(wd.join("non-existing/directory"))
assert_equal pn("/"), @ph.existing_parent(pn("/non-existing/directory"))
end
test "#filter_out_descendants returns the same collection if there are no descendants (empty)" do
assert_equal [], @ph.filter_out_descendants([])
end